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
    @[reducible, inline]

    Inverts the message direction.

    Instances For

      Gets the message head type based on direction.

      Instances For

        Gets the headers of a Message.

        Instances For

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

          Instances For

            Gets the version of a Message.

            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.

              Instances For

                Checks whether the message indicates that the connection should be kept alive.

                Instances For
                  @[implicit_reducible]