Hey everyone,
Sooo, I’m trying to send a post JSON curl request, but it’s just not working for me. 😩 I’ve been staring at my terminal for hours, and I’m pretty sure I’m missing something obvious.
Here’s what I’m doing:
`curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' http://example.com/api`
But I keep getting errors like "400 Bad Request" or "invalid JSON." Am I formatting the JSON wrong? Or is it something with the headers?
If anyone’s got a working example of a post JSON curl request, pls share! Or if you’ve dealt with this before, any tips would be *chef’s kiss*.
Thanks in advance, y’all! 🙏
Sooo, I’m trying to send a post JSON curl request, but it’s just not working for me. 😩 I’ve been staring at my terminal for hours, and I’m pretty sure I’m missing something obvious.
Here’s what I’m doing:
`curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' http://example.com/api`
But I keep getting errors like "400 Bad Request" or "invalid JSON." Am I formatting the JSON wrong? Or is it something with the headers?
If anyone’s got a working example of a post JSON curl request, pls share! Or if you’ve dealt with this before, any tips would be *chef’s kiss*.
Thanks in advance, y’all! 🙏
