Need a simple curl POST example – can anyone share a quick snippet? or Struggling with a curl POST example – any

24 Replies, 1617 Views

Short and sweet:

```
curl -X POST https://example.com/api -H "Content-Type: application/json" -d '{"name":"test"}'
```

If 400 persists, maybe the server expects `Accept: application/json` too? Some APIs are picky.

Messages In This Thread



Users browsing this thread: 1 Guest(s)