Exports
wreq-js exports the following functions and classes:Quick reference
| Function | Description |
|---|---|
fetch() | Make HTTP requests with browser profile options |
get() / post() | Convenience wrappers around fetch() |
request() | Deprecated helper kept for compatibility |
createTransport() | Create a reusable transport context |
createSession() | Create a persistent session with cookie storage |
withSession() | Auto-disposing session helper |
websocket() | Connect to WebSocket servers |
getProfiles() | List available browser profiles |
getOperatingSystems() | List available operating systems |
TypeScript support
wreq-js includes TypeScript definitions for its public API:Fetch style surface
wreq-js provides a fetch like API surface with additional transport and profile options:| Surface | wreq-js |
|---|---|
fetch(url, init) | Available |
fetch(Request, init) | Available |
Request class export | Not currently exposed |
Response class | Available from the package |
Headers class | Available from the package |
AbortController | Standard signal inputs are accepted |
ReadableStream body | Available on response bodies |
Session, Transport, and WebSocket are exported classes, but you should create them via createSession(), createTransport(), and websocket() or new WebSocket(url, ...).
Detailed compatibility notes live at /concepts/compatibility-matrix.