cURL to Code Converter
Convert terminal cURL commands into JavaScript Fetch, Axios, Python Requests, and Node.js
Output Code (FETCH)POST ✓
// JavaScript / TypeScript Fetch API
const response = await fetch('https://api.github.com/repos/universal-apps/desktop/releases', {
method: 'POST',
headers: {
"Accept": "application/vnd.github+json",
"Authorization": "Bearer ghp_99sampleTokenSecret123",
"Content-Type": "application/json"
},
body: JSON.stringify({
"tag_name": "v0.1.3",
"target_commitish": "main",
"name": "v0.1.3 Release",
"draft": false,
"prerelease": false
})
});
const data = await response.json();
console.log(data);