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
base: master
from

Conversation

Projects
None yet
2 participants
@jay
Member

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

data-binary.d: clarify default content-type is x-www-form-urlencoded
- 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
@bagder

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".

This comment has been minimized.

@bagder

bagder Oct 3, 2018

Member

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

@jay

This comment has been minimized.

Member

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 jay:clarify-data-binary branch Oct 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment