Skip to content

cURL से Fetch / Axios

cURL कमांड को JavaScript fetch, Axios या Python requests कोड में बदलें, हेडर, बॉडी, ऑथ और मेथड के साथ।

कोई अपलोड नहीं
const res = await fetch('https://api.example.com/v1/users?team=core', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer TOKEN'
  },
  body: JSON.stringify({
    "name": "Ada",
    "role": "admin"
  })
});
const data = await res.json();
console.log(data);

cURL से Fetch / Axios कैसे इस्तेमाल करें

  1. 1cURL से Fetch / Axios खोलें। यह आपके ब्राउज़र में चलता है, साइन-अप की ज़रूरत नहीं।
  2. 2अपना इनपुट टाइप या पेस्ट करें।
  3. 3नतीजा कॉपी या डाउनलोड करें।

सवाल

Which curl options are supported?

Method (-X), headers (-H), data (-d, --data-raw, --data-urlencode, --json), basic auth (-u), forms (-F), cookies (-b), user agent (-A), -G and -I. Cosmetic flags like -s, -L and --compressed are ignored.

Can I paste a command from Chrome DevTools?

Yes — “Copy as cURL (bash)” output works, including multi-line commands with backslashes.

Are my tokens safe?

Yes. Conversion happens in your browser; nothing is sent anywhere.

और टूल