How to use curl post give input from file in a request? or What's the correct way to curl post give i

18 Replies, 1346 Views

Pro tip: Use `httpie` instead of curl for JSON stuff. Way simpler:

`http POST http://example.com/api < data.json`

But if you’re stuck with curl post give input from file, double-check the file permissions. Can curl read it?

`ls -l data.json`

Might be a silly oversight!

Messages In This Thread



Users browsing this thread: 1 Guest(s)