Just wondering how I can send a curl command with the -d option specifying a file with its path and not a file in the current directory.
This is what I\'m getting wh
The -d @
command option accepts any resolvable file path, as long as the path actually exists. So you could use:
To wit, just the same as hundreds of other *Nix style commands. One quick note, the -d
option will attempt to url encode your data, which from what you describe isn't actually what you want. You should use the --data-binary
option instead. Something like this:
curl -XPOST
-H 'Content-Type:application/json'
-H 'Accept: application/json'
--data-binary @/full/path/to/test.json
http://localhost:8080/easy/eservices/echo -v -s