How to curl with data – what's the best way to include JSON or form data in a request? Alternatively, for a

14 Replies, 843 Views

For how to curl with data, I swear by `-H "Content-Type: application/json"` for JSON.

But if you’re lazy (like me), `httpie` is a game-changer. Just `http POST URL key=value` and it handles headers for you.

For forms, `--data-urlencode` is the way. Less escaping, fewer errors.

Messages In This Thread



Users browsing this thread: 1 Guest(s)