You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
before the final response. This allows the browser to start preloading
2053
+
resources while the server prepares the full response.
2054
+
2055
+
:::caution
2056
+
This feature requires HTTP/2 or newer. Some legacy HTTP/1.1 clients may not
2057
+
Early Hints (`103` responses) are supported in HTTP/2 and newer. Older HTTP/1.1 clients may ignore these interim responses or misbehave when receiving them.
Transfers the file from the given path. Sets the [Content-Type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) response HTTP header field based on the **file** extension or format.
-**IsProxyTrusted**: Checks the trustworthiness of the remote IP.
465
465
-**Reset**: Resets context fields for server handlers.
466
466
-**Schema**: Similar to Express.js, returns the schema (HTTP or HTTPS) of the request.
467
+
-**SendEarlyHints**: Sends `HTTP 103 Early Hints` status code with `Link` headers so browsers can preload resources while the final response is being prepared.
467
468
-**SendStream**: Similar to Express.js, sends a stream as the response.
468
469
-**SendStreamWriter**: Sends a stream using a writer function.
469
470
-**SendString**: Similar to Express.js, sends a string as the response.
-**Context()**: Renamed to `RequestCtx()` to access the underlying `fasthttp.RequestCtx`.
505
506
507
+
### SendEarlyHints
508
+
509
+
`SendEarlyHints` sends an informational [`103 Early Hints`](https://developer.chrome.com/docs/web-platform/early-hints) response with `Link` headers based on the provided `hints` argument. This allows a browser to start preloading assets while the server is still preparing the final response.
0 commit comments