Paste a cURL command and get equivalent fetch, axios, Python requests, Go, or PHP code.
Try an example
https://api.thetoolhive.dev/v1/users
Fetch (JS) code
const response = await fetch("https://api.thetoolhive.dev/v1/users", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer sk_live_7f3d9a2b"
},
body: JSON.stringify({
"name": "Ada Lovelace",
"role": "admin",
"active": true
}),
});
const data = await response.json();
console.log(data);