Skip to content

Commit

Permalink
http/post/simple.md: clarify that -d @file skips CRLF
Browse files Browse the repository at this point in the history
Reported-by: kidonng on github
Fixes #319
  • Loading branch information
bagder committed Dec 16, 2023
1 parent 9a14742 commit 9a5b02d
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 9a5b02d

Please sign in to comment.