Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds multipart/form-data support to Grac::Client so callers can upload files using Typhoeus’ multipart handling.
Changes:
- Detect
multipart/form-datarequests, set Typhoeus’multipart: true, and remove theContent-Typeheader 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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