data-binary.d: clarify default content-type is x-www-form-urlencoded#3085
Closed
jay wants to merge 1 commit intocurl:masterfrom
Closed
data-binary.d: clarify default content-type is x-www-form-urlencoded#3085jay wants to merge 1 commit intocurl:masterfrom
jay wants to merge 1 commit intocurl:masterfrom
Conversation
- Advise user that --data-binary sends a default content type of x-www-form-urlencoded, and to have the data treated as arbitrary binary data by the server set the content-type header to octet-stream. Ref: curl#2852 (comment) Closes #xxxx
bagder
approved these changes
Oct 3, 2018
| Like --data the default content-type sent to the server is | ||
| application/x-www-form-urlencoded. If you want the data to be treated as | ||
| arbitrary binary data by the server then set the content-type to octet-stream: | ||
| -H "Content-Type: application/octet-stream". |
Member
There was a problem hiding this comment.
If you use --header literally instead of -H in the body text, it will get highlighted/linked correctly in the output.
Member
Author
|
I did that purposely I thought -H "Content-Type: application/octet-stream" would be less error prone if it were copied compared to -H, --header "Content-Type: application/octet-stream" |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
x-www-form-urlencoded, and to have the data treated as arbitrary
binary data by the server set the content-type header to octet-stream.
Ref: #2852 (comment)
Closes #xxxx
/cc @pps83