Skip to main content

Compatibility Matrix

This page documents API compatibility with WHATWG and Node runtime behavior. It also highlights intentional extensions and current native limitations from the Rust wreq layer.

Fetch compatibility

FeatureStatusNotes
fetch(string | URL, init)SupportedCore entry point.
fetch(Request, init)SupportedRequest fields are used unless explicitly overridden by init.
Unsupported fetch init fields (credentials, mode, cache, referrer, integrity, keepalive, duplex)Not supportedThese fields are currently ignored by wreq-js runtime options.
Request class exportNot supportedRequest can be used as input, but is not exported by this package.
Response.json/text/arrayBuffer/cloneSupportedIncludes stream handling and clone semantics.
Response.blob/formDataSupportedImplemented through runtime Response parsing.
Streaming request body uploadsNot supportedCurrent native request bridge expects buffered bodies.
Standard timeout behaviorExtendedwreq-js defaults to a 30000 ms timeout for safety.
Error type shapeExtendedErrors are RequestError which extends TypeError.

WebSocket compatibility

FeatureStatusNotes
websocket(url, options) helperSupportedAsync helper resolves when open.
new WebSocket(url, ...) constructorSupportedIncludes CONNECTING state and standard constants.
onopen/onmessage/onclose/onerrorSupportedSettable properties with event dispatch ordering by registration time.
addEventListener/removeEventListenerSupportedSupports function listeners, object listeners, once, and signal.
Unknown event namesSupportedIgnored for compatibility with EventTarget behavior.
send(string | Buffer | ArrayBuffer | ArrayBufferView | Blob)SupportedBlob is converted to bytes before bridge send.
binaryType="nodebuffer"ExtensionNode-oriented default for performance and ergonomics.
binaryType="arraybuffer"SupportedStandard compatible binary mode.
binaryType="blob"SupportedStandard compatible binary mode.
bufferedAmountSupportedBest effort byte count based on pending JS side sends.

Session and transport compatibility

FeatureStatusNotes
createSession cookie persistenceSupportedSession cookie jar is reused across session requests and session WebSocket connections.
session.websocket(...)SupportedReuses session transport plus session cookies.
Per request transport override in session fetchSupportedUse transport to override transport details on a specific request.
Per request browser/os/proxy inside session websocketNot supportedSession websocket uses transport from the session context.

Native constraints and roadmap notes

  1. Request upload streaming is currently buffered because the native bridge request API takes full byte payloads.
  2. WebSocket helper remains async by design because connection establishment runs through native upgrade flow.
  3. Additional parity work can be added while preserving current Node-first defaults.