[
Atlas
]
Tools
ES
/
EN
← All tools
cURL to Fetch Converter
Convert a cURL command into JavaScript fetch() code.
curl -X POST https://api.example.com/users \ -H "Content-Type: application/json" \ -d '{"name":"Ana"}'
fetch("https://api.example.com/users", { method: "POST", headers: { "Content-Type": "application/json" }, body: "{\"name\":\"Ana\"}", });