Documentation

Std.Http.Protocol.H1.Message

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

Direction of message flow from the server's perspective.

  • receiving : Direction

    Receiving and parsing incoming requests from clients.

  • sending : Direction

    Client perspective: writing outgoing requests and reading incoming responses.

Instances For

    Gets the headers of a Message.

    Equations
    Instances For

      Returns a copy of the message head with the headers replaced.

      Equations
      Instances For

        Gets the version of a Message.

        Equations
        Instances For
          def Std.Http.Protocol.H1.Message.Head.getSize {dir : Direction} (message : Head dir) (allowEOFBody : Bool) :

          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