taxum
    Preparing search index...

    Represents a router for mapping HTTP methods and their handlers to specific endpoints.

    The class supports various HTTP methods and allows defining handlers for GET, POST, PUT, DELETE, HEAD, OPTIONS, PATCH, TRACE, and CONNECT methods. It also supports a fallback mechanism and the ability to apply middleware layers to all endpoints.

    Index

    Constructors

    Methods

    • Registers a fallback handler which is called if no other method matches.

      Parameters

      • handler: HandlerFn

        the handler function to be executed for this method.

      Returns this

    • Applies the specified layer to all endpoint mappings within this router.

      Parameters

      • layer: Layer

        the layer to be applied to the endpoints.

      Returns this

    • Registers a handler function for specific HTTP methods based on the provided filter.

      Parameters

      • filter: MethodFilter

        the filter that determines which methods the handler should be applied to.

      • handler: HandlerFn

        the handler function to be executed for the specified methods and filter.

      Returns this

    post