API reference › @evolu/common › Http
Task-aware HTTP helpers.
Fetch
| Name | Description |
|---|---|
| FetchBodyError | Error returned when a body mode cannot read or decode a 2xx response. |
| FetchStatusError | Error returned when a body mode receives a non-2xx response. |
| FetchTransportError | Error returned when the native fetch request fails before a response exists. |
| NativeFetchDep | Dependency wrapper for NativeFetch. |
| FetchConsume | Consumes a native Response before fetch settles. |
| FetchError | Error returned by fetch body modes. |
| FetchMode | Body mode for fetch. |
| FetchResponse | Body-free Response view safe to return from fetch. |
| NativeFetch | WHATWG-fetch-compatible function used by fetch. |
| fetch | Fetches a resource and consumes the Response inside the Task, so the body is read while the request signal is still alive. |
Testing
| Name | Description |
|---|---|
| TestNativeFetch | Test NativeFetch that records calls and serves queued handlers. |
| TestNativeFetchCall | Recorded TestNativeFetch call. |
| TestNativeFetchHandler | Handler for one TestNativeFetch call. |
| testCreateNativeFetch | Creates TestNativeFetch. |
| testCreateNativeFetchErroringBody | Creates a Response body for NativeFetch tests that errors on first read. |