writeEarlyHints
fun writeEarlyHints(hints: ERROR CLASS: Symbol not found for js.objects.ReadonlyRecord<kotlin/String, kotlin/Any>)(source)
Sends a status 103 Early Hints
to the client with a Link header, indicating that the user agent can preload/preconnect the linked resources. The hints
is an object containing the values of headers to be sent with early hints message.
Example
const earlyHintsLink = '</styles.css>; rel=preload; as=style';
response.writeEarlyHints({
'link': earlyHintsLink,
});
const earlyHintsLinks = [
'</styles.css>; rel=preload; as=style',
'</scripts.js>; rel=preload; as=script',
];
response.writeEarlyHints({
'link': earlyHintsLinks,
});
Content copied to clipboard
Since
v18.11.0