[b]"How do I properly use curl --post to send data in a request?"[/b] or [b]"What's the correct syntax for curl --

16 Replies, 961 Views

You’re close! Drop the `--post` and use `-X POST`.

For JSON, watch the quotes—bash might eat them. Try:
```
curl -X POST -H "Content-Type: application/json" -d "{\"key\":\"value\"}" http://example.com
```

And silent fails? Yeah, curl’s a jerk like that. `-v` is your bestie.

Messages In This Thread



Users browsing this thread: 1 Guest(s)