A worked example, rendered from real sample data. Sign in to run the tool on your own input.
method: POST
url: https://api.example.com/users
header: Content-Type: application/json
header: Authorization: Bearer abc123
body: {"name":"Ada","role":"admin"}curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer abc123' \
-d '{"name":"Ada","role":"admin"}' \
'https://api.example.com/users'
# Or as JavaScript fetch:
# await fetch('https://api.example.com/users', { method: 'POST', headers: {"Content-Type":"application/json","Authorization":"Bearer abc123"}, body: '{"name":"Ada","role":"admin"}' })
Build a curl command from method, URL, headers & body fields. Part of the DevTools Surf developer suite. Browse more tools in the Developer Utilities collection.