[b]"Need a simple curl post example – how do I send data with curl?"[/b] or [b]"Can someone share a basic curl pos

16 Replies, 890 Views

Yo, had the same issue last week!

For a simple curl post example, this works:

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

Pro tip: Use https://reqbin.com/ to test your requests before running curl. Saves a ton of time!

Also, 400 usually means bad data or missing headers. Double-check your JSON formatting.

Messages In This Thread



Users browsing this thread: 1 Guest(s)