Hey everyone,
So I’m trying to use curl sending JSON to an API, but it’s just not working. I’ve been banging my head against the wall for hours now.
Here’s what I’m doing:
```bash
curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://example.com/api
```
But I keep getting a 400 error. Am I missing something obvious?
Also, does the JSON need to be formatted in a specific way? I’ve tried escaping quotes and stuff, but no luck.
Anyone else run into issues with curl sending JSON? Any tips or tricks would be super helpful!
Thanks in advance!
So I’m trying to use curl sending JSON to an API, but it’s just not working. I’ve been banging my head against the wall for hours now.
Here’s what I’m doing:
```bash
curl -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://example.com/api
```
But I keep getting a 400 error. Am I missing something obvious?
Also, does the JSON need to be formatted in a specific way? I’ve tried escaping quotes and stuff, but no luck.
Anyone else run into issues with curl sending JSON? Any tips or tricks would be super helpful!
Thanks in advance!
