How do I properly send a POST request in cURL? or What's the correct way to make a POST request in cU

18 Replies, 1274 Views

OP here—thanks for all the replies! Tried a bunch of these and finally got it working with the JSON headers. Turns out the API was super strict about `Content-Type`.

One follow-up: How do I handle nested JSON in a post request in curl? Like if I need to send `{"user":{"name":"John"}}`? Do I just escape the quotes or is there a cleaner way?

Also, big shoutout to whoever suggested Postman. Lifesaver for testing!

Messages In This Thread



Users browsing this thread: 1 Guest(s)