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)
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
Responsewithtext(),json(),arrayBuffer(),blob(),formData(),bodystream - Default timeout: 60 seconds; use
AbortSignalfor per-request cancellation
- Supports
Headers— HTTP headers classget(),set(),append(),delete(),has(),forEach(),entries(),keys(),values(),getSetCookie()
Request— HTTP request classmethod,headers,url,signal,redirect,clone(), plus body mixin methods
Rong.SSE— Server-Sent Events async iterator clientnew Rong.SSE(url, options?)— connect to an SSE endpoint, returns anAsyncIterable<SSEEvent>for await (const event of sse)— iterate events ({ type, data, id, origin })close()— close the connectionurl— the connection URL- Options:
headers,signal,requestTimeoutMs,reconnect(withenabled,maxRetries,baseDelayMs,maxDelayMs)
Dependencies
~21–45MB
~782K SLoC