fetch, Blob, File, Headers, FormData, Request, and Response are globals and follow the
Fetch Standard.
Differences from browsers
- Requests send
User-Agent: Elide/<version>andAccept: */*unless you set those headers. ELIDE_HTTP_USER_AGENTsets the default user agent; a per-request header overrides it. Values must be printable ASCII.- Gzip, deflate, Brotli, and Zstandard responses are decoded; response headers still describe the encoded body.
- An explicit
Accept-Encodingheader is sent as given; range requests default toidentity. fetch(url, { decompress: false })sendsAccept-Encoding: identityand returns any encoded body unchanged.- A malformed compressed body rejects.
- There is no HTTP cache: conditional headers are sent as given, and a
304has headers and no body. Headersapplies the request, response, no-CORS and immutable guards; iteration lowercases and sorts names and keepsSet-Cookievalues separate.- Integrity checks buffer up to 100 MiB before the response resolves.
- HTTP/1.1, HTTP/2, and HTTP proxies (including HTTPS
CONNECT) work; authenticated proxies fail. - Certificates and hostnames are validated; for trust settings, see Runtime Environment Variables.
To serve HTTP, see Elide.serve or node:http.