HTTPServerResponse.redirect

Sends a redirect request to the client.

struct HTTPServerResponse
@safe
void
redirect
(
T
)
(
T url
,
int status = HTTPStatus.Found
)
if (
is(typeof(url) == string) ||
is(typeof(url) == URL)
)

Parameters

url T

The URL to redirect to

status int

The HTTP redirect status (3xx) to send - by default this is HTTPStatus.found

Meta