Match.Match

Matches a path and method type using a delegate 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)
  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)
    template Match(Temp)
    static if(!is(Temp == void))
    void
    Match
    (
    Result = string
    )
    (
    HTTPMethod method
    ,
    string path
    ,,
    Temp delegate
    (
    HTTPServerRequest
    ,
    HTTPServerResponse
    )
    callback
    ,
    Result delegate
    (
    Temp
    )
    transformer
    )
    if (
    isValidTransformedType!Result
    )
    if (
    !is(Temp == void)
    )

Parameters

method HTTPMethod

The HTTP method matched.

path string

The path assigned to this route.

callback Temp delegate
(
HTTPServerRequest
,
HTTPServerResponse
)

A delegate callback handler for the route.

transformer Result delegate
(
Temp
)

A transformer that converts the handler's output.

Meta