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

24 Replies, 1738 Views

Struggling with curl POST too? Here’s the bare minimum:

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

Fun fact: `-X POST` isn’t needed if you use `-d`.

If you’re getting ignored, try `-v` to see if the request even leaves your machine.

Messages In This Thread



Users browsing this thread: 1 Guest(s)