Maida umarnin CURL zuwa Node Fetch code akan layi

Curl command

Examples: GET - POST - JSON - Basic Auth - Files - Form

CURL zuwa Node Fetch akan layi

Wannan kayan aikin yana taimaka muku ƙirƙirar lambar Node Fetch dangane da umarnin CURL. Kwafi da liƙa umarnin CURL kuma ƙirƙirar Node Fetch.

Me zaku iya yi tare da CURL zuwa Node Fetch mai sauya kan layi?

  • CURL zuwa Node Fetch kayan aiki ne na musamman don canza umarnin CURL zuwa Buƙatun Node Fetch na Node Fetch. Shigar da shigarwar ta hanyar umarnin CURL na mai amfani don samar da lambar Node Fetch.
  • Wannan kayan aikin yana adana lokacin ku kuma yana taimakawa ƙirƙirar lambar Node Fetch cikin sauƙi.
  • CURL zuwa Node Fetch yana aiki da kyau akan Windows, MAC, Linux, Chrome, Firefox, Edge da Safari.

menene CURL?

CURL kayan aikin layin umarni ne mai buɗewa wanda ke zazzage fayiloli daga gidan yanar gizo. Yana goyan bayan ka'idoji iri-iri, gami da Node Fetch, Node FetchS, FTP, SFTP, TFTP, Gopher da sauransu.

Ta yaya ake canza CURL zuwa Node Fetch code? 

Mataki 1: Manna kuma canza buƙatun CURL ɗin ku zuwa Node Fetch code

Mataki 2: Kwafi Node Fetch code

Maida CURL zuwa Node Fetch misali

CURL
curl example.com
Node Fetch
import fetch from 'node-fetch';

fetch('http://example.com');