Bounded response wait middleware.
Bounds the wait for a response from the wrapped Fetch implementation, reporting a 504 Gateway Timeout in place of a response that doesn't arrive in time.
504 Gateway Timeout
Usage
import { createFetch } from "@metreeca/http";import { timeout } from "@metreeca/http/timeout";const client = createFetch(timeout(5000)); Copy
import { createFetch } from "@metreeca/http";import { timeout } from "@metreeca/http/timeout";const client = createFetch(timeout(5000));
RFC 9110 § 15.6.5 - 504 Gateway Timeout
Creates a middleware bounding the wait for a response.
Bounded response wait middleware.
Bounds the wait for a response from the wrapped Fetch implementation, reporting a
504 Gateway Timeoutin place of a response that doesn't arrive in time.Usage
See
RFC 9110 § 15.6.5 - 504 Gateway Timeout