Function newRedirectionResponse

Synopsis

#include <lib/inc/drogon/HttpResponse.h>

static HttpResponsePtr newRedirectionResponse(const std::string &location, HttpStatusCode status=k302Found)

Description

Create a response that returns a redirection page, redirecting to another page located in the location parameter.

Parameters

location - The location to redirect

status - The HTTP status code, k302Found by default. Users could set it to one of the 301, 302, 303, 307, ...

Source

Line 339 in lib/inc/drogon/HttpResponse.h.






Add Discussion as Guest

Log in