PathHandler.addMapping

Adds a mapping to this handler, such that requests which match the given method and pattern will be handed off to the given handler.

Overloaded variations of this method are defined for your convenience, which allow you to add a mapping for multiple HTTP methods and/or path patterns.

Parameters

method Method

The HTTP method to match against.

pattern string

The path pattern to match against. See https://github.com/andrewlalis/path-matcher for more details on the pattern's format.

handler HttpRequestHandler

The handler that will handle matching requests.

Return Value

This path handler, for method chaining.