-
Notifications
You must be signed in to change notification settings - Fork 409
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
Set content type header when payload is provided #153
Open
aziemski
wants to merge
1
commit into
tebeka:master
Choose a base branch
from
aziemski:add-content-type
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
@tebeka can you rerun travis test? There was a problem with jdk installation
|
Re-run, still an error |
minusnine
reviewed
Jul 12, 2019
remote.go
Outdated
func newRequest(method string, url string, data []byte) (*http.Request, error) { | ||
request, err := http.NewRequest(method, url, bytes.NewBuffer(data)) | ||
if err != nil { | ||
return nil, err | ||
} | ||
request.Header.Add("Accept", jsonContentType) | ||
if data != nil { | ||
request.Header.Add(headers.ContentType, mediatypes.ApplicationJSONUtf8) |
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.
Since this was already broken, this needs a test.
Maybe we can modify one of the existing tests to include UTF-8 data in the payload?
aziemski
force-pushed
the
add-content-type
branch
from
August 18, 2020 13:26
c95a971
to
35b7abd
Compare
aziemski
force-pushed
the
add-content-type
branch
from
August 18, 2020 13:41
f1d0b43
to
53927c5
Compare
This was referenced Apr 13, 2023
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.
No description provided.