How do I use curl with a file as input for POST requests? or What's the best way to handle curl using

18 Replies, 1682 Views

Check if the server expects a trailing newline in the JSON. Some do, some don’t. Also, `-d @data.json` should work, but maybe the API needs auth? Try `-u user:pass` if it’s protected.

For big files, `curl --trace-ascii debug.txt` can help log the request.

Messages In This Thread



Users browsing this thread: 1 Guest(s)