Documentation home / Native Module API
Native Module API
Outbound HTTP Client
HTTP request, GET and POST operations implemented using libcurl.
Purpose
HTTP request, GET and POST operations implemented using libcurl.
Exports registered by the module initializer
| Export | Role |
|---|---|
request | request exported function or value |
get | get exported function or value |
post | post exported function or value |
Usage example
import gs_http;
define response = gs_http.get("https://example.com");
print(response.status);
print(response.ok);
print(response.body);request(method, url, body?, headers?) returns status, ok, body, headers and error. TLS verification is enabled; redirect count and connection/total timeouts are bounded. Requires libcurl.
greenServeFE