Modules · Connectivity · Network
HTTP and WebSocket clients. Network lets your program reach the web reactively: a request such as Network.Web.Client.Get returns a Network.Web.Response held in a STATE LOCKED cell — pending until the reply arrives, then flowing through the rest of your program like any other value. It covers the full range of HTTP methods, form posts, header and cookie handling, URL encoding, and live WebSocket connections. Because every call is reactive, a response re-fetches whenever the URL or inputs it reads change.
A cookie as a name–value pair, parsed from or written to a Set-Cookie header.
A single HTTP header as a name–value pair.
A prepared HTTP request: its URL, method, optional headers and body, and reactive reload state.
The result of an HTTP request: its status code, headers, and body. It is pending until the reply arrives, so it is usually held in a STATE LOCKED cell.
A parsed URL broken into its protocol, domain, port, path, and optional query and anchor.
A single message sent or received over a WebSocket connection.
Sends an HTTP DELETE request.
Returns Network.Web.Response — the pending response, locked until the reply arrives.
Fetches a URL with an HTTP GET request.
Repeatedly fetches a URL on a fixed interval.
Returns Network.Web.Response — the latest response, refreshed each interval.
Sends an HTTP HEAD request, retrieving only the headers.
Returns Network.Web.Response — the pending response, whose body is empty for a HEAD request.
Sends an HTTP OPTIONS request.
Returns Network.Web.Response — the pending response describing the server's supported methods.
Sends an HTTP PATCH request with an optional body.
Sends an HTTP POST request with an optional body.
Posts URL-encoded form fields as an HTTP POST.
Returns Network.Web.Response — the pending response; the fields are sent as application/x-www-form-urlencoded .
Sends an HTTP PUT request with an optional body.
Parses a Set-Cookie header value into a cookie.
Returns Network.Web.Cookie — the name and value parsed from the header.
Finds the value of a named cookie among Set-Cookie header values.
Returns Collection.Optional(Text) — the matching cookie's value, or nothing when it is absent.
Renders a cookie as a name=value header string.
Returns Text — the cookie as name=value .
Emits one header into the enclosing GatherArray block.
Returns nothing — it adds one header to the surrounding Network.Web.Header.GatherArray .
Collects the headers emitted in its block into an array.
An indented block that calls Network.Web.Header.Emit once for each header to include.
Returns Collection.Array(Network.Web.Header) — every header emitted inside the block.
All values of headers matching a name, case-insensitively.
Returns Collection.Array(Text) — every value whose header name matches, ignoring case.
An empty response with status code zero and no body.
Returns Network.Web.Response — a blank response, useful as the initial value of a locked cell.
Percent-encodes text for safe use in a URL.
Returns Text — the percent-encoded text.
Opens a live WebSocket connection over its scope.
Returns nothing — it keeps the connection open while in scope, publishing incoming messages into receivedMessages .