Message #
This module provides types and operations for HTTP/1.1 messages, centered around the Direction
type which models the server's role in message exchange: Direction.receiving for parsing incoming
requests from clients, and Direction.sending for generating outgoing responses to clients.
The Message.Head type is parameterized by Direction and resolves to Request.Head or
Response.Head accordingly, enabling generic code that works uniformly across both phases
while exposing common operations such as headers, version, and shouldKeepAlive
Equations
- Std.Http.Protocol.H1.instBEqDirection.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Inverts the message direction.
Equations
Instances For
Gets the message head type based on direction.
Equations
Instances For
Returns a copy of the message head with the headers replaced.
Equations
Instances For
Determines the message body size based on the Content-Length header and the Transfer-Encoding (chunked) flag.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Checks whether the message indicates that the connection should be kept alive.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Std.Http.Protocol.H1.instEmptyCollectionHead = { emptyCollection := { method := Std.Http.Method.get, version := Std.Http.Version.v11 } }
- Std.Http.Protocol.H1.instEmptyCollectionHead = { emptyCollection := { } }