bopaKopoYaHTTP
E bopa Request ya HTTP.
bopaKopoYaHTTP(URL, [mokgwa], [ditlhogo], [diteng])E amogela URL, mokgwa, headers le diteng ka tatelano. JSON, HTTP le maina a headers a sala fela jaaka a ntse.
Diparamethara
Karolo e e bidiwang “Diparamethara”| Leina | Mofuta | Tlhaloso |
|---|---|---|
URL | `mokwalo | Request` |
mokgwa (ka boitlhophelo) | mokwalo | Mokgwa wa HTTP. |
ditlhogo (ka boitlhophelo) | `selo | Headers` |
diteng (ka boitlhophelo) | `mokwalo | Blob` |
tiro setaLoeto() {
tlosaKanefase();
diri r = bopaKopoYaHTTP("data:text/plain,Dumela", "GET", {"Accept": "text/plain"});
bopaTemana(letela dirisaHTTP(r, undefined, "text"));
}