dirisaHTTP
→ httpDo()Makes a general HTTP request.
dirisaHTTP(URL, [mokgwa], [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. Pinned 2.3.2 takes (URL or Request, method, type, success, error); it has no separate body argument. Construct a Request for body and headers. Omit method (or pass undefined) to preserve the Request method. Supports PUT, PATCH and DELETE under browser rules. The inline fixture performs no remote write.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
URL | `mokwalo | Request` |
mokgwa (optional) | mokwalo | HTTP method; undefined preserves a Request method. |
mofuta (optional) | mokwalo | json, text or blob. GET/POST default to text; general HTTP can infer from the URL. |
faGoSiame (optional) | tiro | Success callback. Its return becomes the Promise value. |
faGoPalelwa (optional) | tiro | Error callback; returning recovers the Promise, throwing rejects it. |
Examples
Section titled “Examples”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);
}