http

host module

HTTP client (rustls; no system TLS dependency); opts is required; returns HttpResponse.

use http — HTTP client (rustls; no system TLS dependency). opts is required: Value::Null or a map of headers (map), timeout (secs), redirects (bool, default true).

functionsignature
get(url, opts) -> Result[HttpResponse, string]
post(url, body: string, opts) -> Result[HttpResponse, string]
download(url, dest_path, opts) -> Result[int, string] — returns byte count

§ 1.1HttpResponse

rust
struct HttpResponse { status: int, body: string, headers: Map[string, string] }