How to Properly Send POST Data with curl? Need Help! or What’s the Best Way to Use curl POST Data in

16 Replies, 1870 Views

If you’re on Windows, watch out for cmd vs. PowerShell quirks with curl post data. PowerShell hates single quotes for JSON, so use double quotes and escape them:

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

Or just use WSL/Linux. 😅

Messages In This Thread



Users browsing this thread: 1 Guest(s)