Skip to content

HTTP server API brainstorming #137

@lucacasonato

Description

@lucacasonato

HTTP handler functions

  • What is the handler signature for handling HTTP requests
    • (req: Request) => Promise<Response> | Response
    • Do we pass in the fetch Request object directly, or inside of an object (at a request key)
    • How do you get request metadata that is not on the fetch Request object itself, such as client IP address or geolocation
  • Websocket upgrades
  • Raw HTTP upgrades
  • How do you do middlewares
    • function (req: Request, next: (req: Request) => Promise<Response>): Promise<Response>;
  • How do you do routing?
  • Proxying HTTP requests/responses to downstream services
  • Cookie handling?
  • Caching?
  • Streaming request bodies / response bodies

HTTP server

  • How do you start a server
    • Parallel servers across threads / processes
  • Cross cutting concerns with Sockets API - can this layer on-top?
  • Keepalive behaviour
  • HTTP/1.1 vs HTTP/2 vs HTTP/3
  • TLS + client authentication
  • Automatic response body compression, and request body decompression

Prior art:

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