Hey! Here’s a dead-simple curl POST example for your case:
```
curl -X POST https://example.com/api \
-H 'Content-Type: application/json' \
-d '{"name": "test"}'
```
The `-X POST` is optional (curl defaults to POST with `-d`), but I like being explicit.
And yes, you *usually* need the `Content-Type` header—some APIs will ignore your data without it.
If you’re still stuck, try `-v` to see the full request/response. Helps debug those 400 errors!
```
curl -X POST https://example.com/api \
-H 'Content-Type: application/json' \
-d '{"name": "test"}'
```
The `-X POST` is optional (curl defaults to POST with `-d`), but I like being explicit.
And yes, you *usually* need the `Content-Type` header—some APIs will ignore your data without it.
If you’re still stuck, try `-v` to see the full request/response. Helps debug those 400 errors!
