Maida umarnin CURL zuwa lambar Javascript XHR akan layi

Curl command

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

CURL zuwa Javascript XHR Kan layi

Wannan kayan aikin yana taimaka muku ƙirƙirar lambar XHR ta Javascript dangane da Umurnin CURL. Kwafi da Manna Umarnin CURL da Ƙirƙirar Javascript XHR.

Me zaku iya yi da CURL zuwa Javascript XHR Converter Online?

  • CURL zuwa Javascript XHR kayan aiki ne na musamman don canza umarnin cURL zuwa buƙatar Javascript XHR na Javascript XHR. Shigar da shigarwar ta hanyar umarnin cURL na mai amfani don samar da lambar XHR na Javascript.
  • Wannan kayan aikin yana adana lokacinku kuma yana taimakawa ƙirƙirar lambar XHR na Javascript cikin sauƙi.
  • CURL zuwa Javascript XHR 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 Javascript XHR, Javascript XHRS, FTP, SFTP, TFTP, Gopher da sauransu.

Ta yaya ake canza CURL zuwa Javascript XHR code? 

Mataki 1: Manna kuma canza buƙatun CURL ɗin ku zuwa Javascript XHR code

Mataki 2: Kwafi Javascript XHR code

Maida CURL zuwa Javascript XHR misali

CURL
curl example.com
Javascript XHR
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://example.com/");

xhr.send(data);