-
-
Notifications
You must be signed in to change notification settings - Fork 60
Allow passing content-type header to GitHubAPI.POST #131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When the content-type is passed, the raw body is used in the request. The default content-type is json, and the body would be parsed to JSON format. Updated documentation and changelog. Closes #115
Codecov Report
@@ Coverage Diff @@
## master #131 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 391 395 +4
Branches 73 74 +1
=========================================
+ Hits 391 395 +4
Continue to review full report at Codecov.
|
|
I've tested by uploading a zip file to my test repo's release : |
brettcannon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the API can be simplified by defaulting to "application/json" since it's the most common content-type for this. If you disagree then feel free to submit the PR as-is. I also have a comment setting the content-length regardless of content-type.
Otherwise LGTM!
Co-authored-by: Brett Cannon <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
Co-authored-by: Brett Cannon <[email protected]>
|
Thanks! |
When the content-type is passed, the raw body is used in the request.
The default content-type is json, and the body would be parsed to JSON format.
Updated documentation and changelog.
Closes #115