HTTP::GET
1g 2023-11-15 laplante@plcb.ca GOWEB/HTTPauthor: laplante@plcb.ca date: 2023-11-15 title: “HTTP::GET Function” version: 1.0.0 section: 1g
http::get — Perform HTTP GET requests
http::get(url, [url…, error: err, timeout: duration])
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.
"1s"
, "1m"
, "1h"
, etc.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
.
// Single request
response := http::get("https://example.com")
// Multiple requests in parallel
responses := http::get("https://example.com", "https://example.org", timeout: "5s")