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.

കൂടുതൽ ടൂളുകൾ