3 releases (breaking)

Uses new Rust 2024

new 0.3.0 Apr 7, 2026
0.2.0 Feb 22, 2026
0.1.1 Jan 29, 2026

#362 in HTTP client


Used in 5 crates (2 directly)

MIT/Apache

385KB
8K SLoC

rong_http

HTTP client providing the standard Fetch API and Server-Sent Events.

JS APIs

  • fetch(url, options?) — global function for making HTTP requests
    • Supports method, headers, body, signal, redirect
    • Returns Response with text(), json(), arrayBuffer(), blob(), formData(), body stream
    • Default timeout: 60 seconds; use AbortSignal for per-request cancellation
  • Headers — HTTP headers class
    • get(), set(), append(), delete(), has(), forEach(), entries(), keys(), values(), getSetCookie()
  • Request — HTTP request class
    • method, headers, url, signal, redirect, clone(), plus body mixin methods
  • Rong.SSE — Server-Sent Events async iterator client
    • new Rong.SSE(url, options?) — connect to an SSE endpoint, returns an AsyncIterable<SSEEvent>
    • for await (const event of sse) — iterate events ({ type, data, id, origin })
    • close() — close the connection
    • url — the connection URL
    • Options: headers, signal, requestTimeoutMs, reconnect (with enabled, maxRetries, baseDelayMs, maxDelayMs)

Dependencies

~21–45MB
~782K SLoC