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

16 Replies, 1570 Views

omg curl errors are the worst.

Try this for a post request in curl:

```curl -X POST https://example.com/api -d @data.json -H "Content-Type: application/json"```

Save your JSON to `data.json` file first.

If it’s still not working, maybe the endpoint is wrong? Double-check the URL!

Messages In This Thread



Users browsing this thread: 1 Guest(s)