http library

The wire types in full: Request, Response, Headers, Body, URLPattern and Router.

The main barrel exports only Request, Response and Headers, which is the surface it has always had. Widening it to the whole set broke a downstream application that had its own Body -- a generic name, and a reasonable one for an application to use.

Server code that wants all of them imports this instead.

Classes

Body
DVIpAddress
An IPv4 or IPv6 address.
DVPeerAddress
The address and, when known, the port at the other end of a connection.
DVRouteBodyLimit
A route as the native server needs to know it: its method, its pattern, and the largest body it reads.
Headers
Request
Response
Router
Routes a request to the first route whose method and pattern match it.
URLPattern

Constants

dvDefaultSecurityHeaders → const Map<String, String>
The headers every response gets when it has not set the same name itself.
dvDefaultStrictTransportSecurity → const String
HSTS for a response served over TLS: one year, no includeSubDomains, since a framework cannot know what else runs under the same domain.

Functions

dvApplySecurityHeaders(Headers headers, {Map<String, String> baseline = dvDefaultSecurityHeaders, bool overTls = false}) → void
Adds baseline to headers, keeping any header the handler already set, and HSTS when overTls is true.