Return body None when request has no body#87
Merged
camilamaia merged 3 commits intomasterfrom Jan 2, 2020
Merged
Conversation
a6340b6 to
5042d32
Compare
barbosa
approved these changes
Dec 21, 2019
Member
barbosa
left a comment
There was a problem hiding this comment.
Cool. I wonder if params and headers should have the same behavior for consistency.
4e2b5d5 to
2ab866f
Compare
Codecov Report
@@ Coverage Diff @@
## master #87 +/- ##
=========================================
+ Coverage 90.08% 90.18% +0.1%
=========================================
Files 14 14
Lines 373 377 +4
=========================================
+ Hits 336 340 +4
Misses 37 37
Continue to review full report at Codecov.
|
Member
Author
|
Good catch @barbosa, thanks. I updated it. |
barbosa
approved these changes
Dec 26, 2019
It was returning {} instead of None. Then, in the request headers, it was sending content-length as 2, when it should not send content-length at all
2ab866f to
5d5b6ad
Compare
5d5b6ad to
8cf752e
Compare
Merged
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.
Description
When creating requests without body It was setting body as
{}instead of None. The consequence of that is that it sendscontent-lengthas 2 in the headers, when it should not sendcontent-lengthat all