Skip to content

data-binary.d: clarify default content-type is x-www-form-urlencoded#3085

Closed
jay wants to merge 1 commit intocurl:masterfrom
jay:clarify-data-binary
Closed

data-binary.d: clarify default content-type is x-www-form-urlencoded#3085
jay wants to merge 1 commit intocurl:masterfrom
jay:clarify-data-binary

Conversation

@jay
Copy link
Copy Markdown
Member

@jay jay commented Oct 3, 2018

  • 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: #2852 (comment)

Closes #xxxx


/cc @pps83

- 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
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".
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you use --header literally instead of -H in the body text, it will get highlighted/linked correctly in the output.

@jay
Copy link
Copy Markdown
Member Author

jay commented Oct 3, 2018

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"

@jay jay closed this in f33312f Oct 3, 2018
@jay jay deleted the clarify-data-binary branch October 3, 2018 06:33
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants