HTTP::GET 1g 2023-11-15 laplante@plcb.ca GOWEB/HTTP


author: laplante@plcb.ca date: 2023-11-15 title: “HTTP::GET Function” version: 1.0.0 section: 1g

category: GOWEB/HTTP

Name

http::get — Perform HTTP GET requests

Synopsis

http::get(url, [url…, error: err, timeout: duration])

Description

The http::get function sends one or multiple HTTP GET requests in parallel to the specified URLs.
The function returns a map where each key is the URL and the value is the corresponding response.

Parameters

A duration string is a signed or unsigned sequence of decimal numbers, each with an optional fraction and a unit suffix (e.g., "300ms", "-1.5h", "2h45m").
Valid time units include:
ns, us (or µs), ms, s, m, h, d, w, y.

Examples

// Single request
response := http::get("https://example.com")

// Multiple requests in parallel
responses := http::get("https://example.com", "https://example.org", timeout: "5s")

See also

Version