Given this Hurl file:
POST https://httpbin.io/anything
```
@filename
```
(post a text body @filename), the debug curl command produced by Hurl is erroneous:
$ hurl --verbose test.hurl
* ------------------------------------------------------------------------------
* Executing entry 1
*
...
* Request can be run with the following curl command:
* curl --header 'Content-Type:' --data $'@filename\n' 'https://httpbin.io/anything'
*
> POST /anything HTTP/1.1
Then running the curl command:
$ curl --header 'Content-Type:' --data $'@filename\n' 'https://httpbin.io/anything'
curl: Failed to open filename
curl: option --data: error encountered when reading a file
curl: try 'curl --help' or 'curl --manual' for more information
When producing curl command, we should:
- use
--data-raw for non binary body that doesn't start with an @
- use
--data-binary otherwise
Given this Hurl file:
(post a text body
@filename), the debug curl command produced by Hurl is erroneous:Then running the curl command:
When producing curl command, we should:
--data-rawfor non binary body that doesn't start with an@--data-binaryotherwise