Skip to content

Add multipart form data support#46

Merged
tobischo merged 4 commits intomasterfrom
feature/add-multipart-form-data-support
Feb 13, 2026
Merged

Add multipart form data support#46
tobischo merged 4 commits intomasterfrom
feature/add-multipart-form-data-support

Conversation

@tobischo
Copy link
Collaborator

Currently, file uploads are not supported through grac.
This adds support for multipart form data. It relies on the support for it provided by typhoeus

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds multipart/form-data support to Grac::Client so callers can upload files using Typhoeus’ multipart handling.

Changes:

  • Detect multipart/form-data requests, set Typhoeus’ multipart: true, and remove the Content-Type header so Typhoeus can set the boundary.
  • Update request body preparation to avoid encoding multipart bodies.
  • Add specs and documentation, and bump gem version to 4.5.0.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/grac/client.rb Adds multipart request handling + multipart body preparation branch.
spec/lib/grac/client_spec.rb Adds coverage for multipart/non-multipart call behavior and multipart body preparation.
README.md Documents multipart/file upload usage with examples.
lib/grac/version.rb Bumps library version to 4.5.0.
Gemfile.lock Updates locked version to 4.5.0.
CHANGELOG.md Adds a 4.5.0 entry describing multipart support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Since the default header is set with casing, and handled with casing in
prepare_body_by_content_type, we should keep it consistent
@tobischo tobischo self-assigned this Feb 13, 2026
@tobischo tobischo merged commit 612f377 into master Feb 13, 2026
4 checks passed
@tobischo tobischo deleted the feature/add-multipart-form-data-support branch February 13, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants