staticRedirect

Provides a HTTP request handler that responds with a static redirection to the specified URL.

  1. HTTPServerRequestDelegate staticRedirect(string url, HTTPStatus status)
  2. HTTPServerRequestDelegate staticRedirect(URL url, HTTPStatus status)
    @safe
    staticRedirect
    (
    URL url
    ,
    HTTPStatus status = HTTPStatus.found
    )

Parameters

url URL

The URL to redirect to

status HTTPStatus

Redirection status to use (by default this is HTTPStatus.found).

Return Value

Returns a HTTPServerRequestDelegate that performs the redirect

Meta