Skip to content

How to send early hints #4

@lucacasonato

Description

@lucacasonato

existing signature: (req: Request) => Promise<Response>

two options:

  1. method on the request
    req.sendEarlyHints(headers)

  2. part of the response

type EarlyHint = { headers: Headers; response: Promise<Response> };
type Handler = (req: Request) => Promise<Response> | Promise<EarlyHint>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions