Tlola o ye mo diteng
DikaiBula setseleganyi ↗

dirisaHTTP

→ httpDo()

E dira kopo ya HTTP.

dirisaHTTP(URL, [mokgwa], [mofuta], [faGoSiame], [faGoPalelwa])

E busa Promise; dirisa letela mo tirong. URL e e tswang kwa ntle e letleletswe; CORS le melao ya HTTPS ya sebatli di a dira. Mofuta wa JSON ga o fetole maina a dinonofo tsa karabo. Dirisa Request go neela diteng le headers. Mofuta o ka nna json, text kgotsa blob.

LeinaMofutaTlhaloso
URL`mokwaloRequest`
mokgwa (ka boitlhophelo)mokwaloGET, POST, PUT, PATCH kgotsa DELETE.
mofuta (ka boitlhophelo)mokwalojson, text kgotsa blob.
faGoSiame (ka boitlhophelo)tiroTiro e e amogelang se se tlisitsweng.
faGoPalelwa (ka boitlhophelo)tiroTiro e e amogelang phoso.
E dira kopo ya HTTP.
tiro setaLoeto() {
  tlosaKanefase();
  diri r = bopaKopoYaHTTP("data:text/plain,OK", "PUT", {"Content-Type": "text/plain"}, "Dumela");
  diri d = letela dirisaHTTP(r, undefined, "text");
  bopaTemana(d);
}

bopaTemana, dirisaMoGo