Skip to content
ExamplesOpen editor ↗

tlisaKaHTTP

→ httpGet()

Makes an HTTP GET request.

tlisaKaHTTP(URL, [mofuta], [faGoSiame], [faGoPalelwa])

Returns a Promise; use letela inside a function. External URLs are allowed without an endpoint allowlist or proxy. Browser CORS, mixed-content and credential rules still apply. JSON object keys remain unchanged. Accepts (URL, type, success, error), or callbacks without a type. A Request supplies custom headers. The example uses an inline data URL to run without a service.

NameTypeDescription
URL`mokwaloRequest`
mofuta (optional)mokwalojson, text or blob. GET/POST default to text; general HTTP can infer from the URL.
faGoSiame (optional)tiroSuccess callback. Its return becomes the Promise value.
faGoPalelwa (optional)tiroError callback; returning recovers the Promise, throwing rejects it.
Makes an HTTP GET request.
tiro setaLoeto() {
  tlosaKanefase();
  diri d = letela tlisaKaHTTP("data:text/plain,Dumela", "text");
  bopaTemana(d);
}

bopaTemana, dirisaMoGo