Bro, curl http post can be tricky. Your command works for form data, but JSON needs headers. Try this:
`curl -X POST https://example.com/api -H "Content-Type: application/json" -d '{"key":"value"}'`
If it fails, maybe the server expects something else. Use `-v` to see the full convo. Also, check out curlconverter.com—it turns browser requests into curl commands.
`curl -X POST https://example.com/api -H "Content-Type: application/json" -d '{"key":"value"}'`
If it fails, maybe the server expects something else. Use `-v` to see the full convo. Also, check out curlconverter.com—it turns browser requests into curl commands.
