RoutableContext is additional interface that structures implementing Context must implement. Methods inside this interface are meant for request routing purposes and should not be used in middlewares.

Hierarchy

  • RoutableContext

Indexable

[key: string]: any

Methods

  • Set saves data in the context. Allows router to store arbitrary (that only router has access to) data in context for later use in middlewares/handler.

    Parameters

    • key: string
    • val: {}

      Returns void

    • SetPath sets the registered path for the handler.

      Parameters

      • p: string

      Returns void

    • SetRawPathParams replaces any existing param values with new values for this context lifetime (request). Do not set any other value than what you got from RawPathParams as allocation of PathParams is handled by Context.

      Parameters

      Returns void

    • SetRouteInfo sets the route info of this request to the context.

      Parameters

      Returns void

    Generated using TypeDoc