400 errors are the worst. Here’s what works for me 99% of the time:
```
curl -H "Content-Type: application/json" -d '{"name":"test"}' https://example.com/api
```
Pro tip: If the API needs auth, slap on `-H 'Authorization: Bearer YOUR_TOKEN'`.
Also, check out Postman or Insomnia if you’re tired of debugging curl commands. They’re lifesavers for API testing.
```
curl -H "Content-Type: application/json" -d '{"name":"test"}' https://example.com/api
```
Pro tip: If the API needs auth, slap on `-H 'Authorization: Bearer YOUR_TOKEN'`.
Also, check out Postman or Insomnia if you’re tired of debugging curl commands. They’re lifesavers for API testing.
