@std/web

Getting Started

No install step: the module ships inside the compiler. Import what you need:

.rnx
import { URL } from "@std/web";

Quickstart

Copy this into a file or open it straight in the playground:

.rnx
import { URL, Headers, statusCode, HttpStatus } from "@std/web";


let u = new URL("https://example.com:8080/a/b?x=1#frag");
print(u.href());
print(u.hostname(), u.port(), u.pathname());
let h = new Headers();
h.set("Content-Type", "text/plain");
print(h.get("content-type").unwrap());
print(statusCode(HttpStatus.NotFound));