How to properly send a curl post request with JSON data? or Why is my curl post request returning a 4

14 Replies, 1565 Views

Yo, headers are *key* here. Your curl post request might need more than just `Content-Type`. Some APIs want `Accept: application/json` or an `Authorization` header.

Also, the order of flags doesn’t matter, but missing/extra quotes in JSON will break it. Try `jq .` to validate your JSON before sending.

Messages In This Thread



Users browsing this thread: 1 Guest(s)