Match.Match

Matches a path and method type using a function callback.

  1. void Match(HTTPMethod method, string path, Temp function(HTTPServerRequest, HTTPServerResponse) callback, Result function(Temp) transformer)
  2. void Match(HTTPMethod method, string path, string contentType, Temp function(HTTPServerRequest, HTTPServerResponse) callback, Result function(Temp) transformer)
    template Match(Temp)
    static if(!is(Temp == void))
    void
    Match
    (
    Result = string
    )
    (
    HTTPMethod method
    ,
    string path
    ,,
    Temp function
    (
    HTTPServerRequest
    ,
    HTTPServerResponse
    )
    callback
    ,
    Result function
    (
    Temp
    )
    transformer
    )
    if (
    isValidTransformedType!Result
    )
    if (
    !is(Temp == void)
    )
  3. void Match(HTTPMethod method, string path, Temp delegate(HTTPServerRequest, HTTPServerResponse) callback, Result delegate(Temp) transformer)
  4. void Match(HTTPMethod method, string path, string contentType, Temp delegate(HTTPServerRequest, HTTPServerResponse) callback, Result delegate(Temp) transformer)

Parameters

method HTTPMethod

The HTTP method matched.

path string

The path assigned to this route.

callback Temp function
(
HTTPServerRequest
,
HTTPServerResponse
)

A function callback handler for the route.

transformer Result function
(
Temp
)

A transformer that converts the handler's output.

Meta