cURL converter
Turn a cURL command into fetch, PHP or WordPress HTTP code.
JavaScript fetch
const response = await fetch("https://api.example.com/v1/items", {
method: "POST",
headers: {
"Authorization": "Bearer TOKEN",
"Content-Type": "application/json",
},
body: "{\"name\":\"Widget\"}",
redirect: "manual",
});
const data = await response.text();Runs in your browser. Nothing you enter is sent anywhere.