Documentation

Std.Internal.Http.Data.Extensions

Extensions #

This module provides the Extensions type, a dynamically-typed map for storing metadata on HTTP requests and responses. It can be used by parsers, middleware, or other processing stages to attach arbitrary typed data.

An ordering for Name keys used by Extensions.

Instances For

    A dynamically typed map for optional metadata that can be attached to HTTP requests and responses. Extensions allow storing arbitrary typed data keyed by type name, useful for metadata such as socket information or custom processing data.

    Instances For

      An empty extensions map with no data.

      Instances For
        @[inline]

        Retrieves a value of type α from the extensions, if present.

        Instances For
          @[inline]
          def Std.Http.Extensions.insert {α : Type u_1} (x : Extensions) [TypeName α] (data : α) :

          Inserts a value into the extensions, keyed by its type name. If a value of the same type already exists, it is replaced.

          Instances For
            @[inline]

            Removes the value of type α from the extensions.

            Instances For
              @[inline]

              Checks whether the extensions contain a value of type α.

              Instances For