Having trouble with curl sending JSON? Need help with the correct syntax and headers!

7 Replies, 1918 Views

Yo, I feel your pain. curl sending json can be a headache, especially with quotes. Double quotes around the JSON and escaping the inner ones usually works for me.

Also, make sure your JSON is valid. I use https://jsonlint.com/ to check if my JSON is formatted correctly before sending it.

One more thing: if you’re on Windows, the command might behave differently. In that case, try using `\"` for escaping quotes or even PowerShell instead of cmd.

Messages In This Thread



Users browsing this thread: 1 Guest(s)