rong_http 0.3.0

HTTP module for RongJS
docs.rs failed to build rong_http-0.3.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rong_http-0.1.1

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)