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

24 Replies, 1709 Views

Here’s my go-to curl POST example for APIs:

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

Bonus: If the API uses HTTPS and you’re getting cert errors, add `-k` (but only for testing—don’t ship that!).

Messages In This Thread



Users browsing this thread: 1 Guest(s)