Fawkes API Fawkes Development Version
|
Redirect reply for webview. More...
#include <>>
Public Member Functions | |
WebRedirectReply (std::string url) | |
Constructor. More... | |
![]() | |
StaticWebReply (Code code, std::string body="") | |
Constructor. More... | |
void | append_body (const char *format,...) |
Append to body. More... | |
void | append_body (const std::string &s) |
Append string to body. More... | |
StaticWebReply & | operator+= (std::string text) |
Append simple text line. More... | |
virtual const std::string & | body () |
Get body. More... | |
virtual std::string::size_type | body_length () |
Get length of body. More... | |
virtual void | pack () |
Pack the data. More... | |
![]() | |
WebReply (Code code) | |
Constructor. More... | |
virtual | ~WebReply () |
Destructor. More... | |
Code | code () const |
Get response code. More... | |
void | set_code (Code code) |
Set response code. More... | |
void | add_header (const std::string &header, const std::string &content) |
Add a HTTP header. More... | |
void | add_header (const std::string &header_string) |
Add a HTTP header. More... | |
const HeaderMap & | headers () const |
get headers. More... | |
void | set_caching (bool caching) |
Enable or disable caching for this specific reply. More... | |
void | set_request (WebRequest *request) |
Set associated request. More... | |
WebRequest * | get_request () const |
Get associated request. More... | |
void | pack_caching () |
Called just before the reply is sent. More... | |
Redirect reply for webview.
This reply will cause an immediate redirect from the requested page to the given URL. THe URL can be local as well as remote. The redirect is done on the HTTP level with status code "moved permanently" and the new URL as "Location" HTTP header.
Definition at line 30 of file redirect_reply.h.
fawkes::WebRedirectReply::WebRedirectReply | ( | std::string | url | ) |
Constructor.
url | the URL to redirect to |
Definition at line 39 of file redirect_reply.cpp.
References fawkes::WebReply::add_header().