Skip to content
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

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

Closed
wants to merge 1 commit into from

Conversation

jay
Copy link
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
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
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