[b]"How do I send a POST request from curl? Need help with the syntax!"[/b] or [b]"What’s the correct way to make

20 Replies, 1799 Views

If you’re on Windows, watch out for quotes in post request from curl. CMD and PowerShell handle them differently.

I usually use double quotes for the JSON and escape the inner ones:

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

Painful, but it works.

Messages In This Thread



Users browsing this thread: 1 Guest(s)