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

http/post/simple.md: clarify that -d @file skips CRLF #351

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions http/post/simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ command line, you can also read it from a filename in standard curl style:

While the server might assume that the data is encoded in some special way,
curl does not encode or change the data you tell it to send. **curl sends
exactly the bytes you give it**.
exactly the bytes you give it** (except that when reading from a file. `-d`
will skip over the carriage returns and newlines so you need to use
`--data-binary` if you rather intend them to be included in the data.).

To send a POST body that starts with a `@` symbol, to avoid that curl tries to
load that as a filename, use `--data-raw` instead. This option has no file
loading capability:

curl --data-raw '@string' https://example.com

Loading