romelaKaHTTP
→ httpPost()Makes an HTTP POST request.
romelaKaHTTP(URL, diteng, [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. The second argument is the body. Objects become JSON; strings are sent as text. Pinned 2.3.2 creates its own Content-Type header and replaces headers on an input Request. Use dirisaHTTP with bopaKopoYaHTTP for custom headers. This inline data-URL fixture returns OK; replace it with your CORS-enabled service to perform a real write.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
URL | `mokwalo | Request` |
diteng | `selo | mokwalo` |
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 d = letela romelaKaHTTP("data:text/plain,OK", {palo: 3}, "text");
bopaTemana(d);
}