Fawkes API
Fawkes Development Version
|
Basic web reply. More...
#include <>>
Public Member Functions | |
WebReply (response_code_t code) | |
Constructor. More... | |
virtual | ~WebReply () |
Destructor. More... | |
response_code_t | code () const |
Get response code. More... | |
void | add_header (std::string header, std::string content) |
Add a HTTP header. More... | |
void | add_header (std::string header_string) |
Add a HTTP header. More... | |
const HeaderMap & | headers () const |
get headers. More... | |
Basic web reply.
The base class for all web replies. Though the WebRequestDispatcher expects sub-classes of StaticWebReply or DynamicWebReply.
typedef std::map<std::string, std::string> fawkes::WebReply::HeaderMap |
HTTP response code.
fawkes::WebReply::WebReply | ( | response_code_t | code | ) |
void fawkes::WebReply::add_header | ( | std::string | header, |
std::string | content | ||
) |
Add a HTTP header.
header | header entry name |
content | content of the header field |
Definition at line 72 of file reply.cpp.
Referenced by fawkes::dynamic_reply_free_cb(), fawkes::DynamicFileWebReply::DynamicFileWebReply(), ROSWebviewRequestProcessor::process_request(), and fawkes::WebRedirectReply::WebRedirectReply().
void fawkes::WebReply::add_header | ( | std::string | header_string | ) |
WebReply::response_code_t fawkes::WebReply::code | ( | ) | const |
Get response code.
Definition at line 61 of file reply.cpp.
Referenced by fawkes::dynamic_reply_free_cb(), fawkes::WebPageReply::pack(), and WebReply().
const WebReply::HeaderMap & fawkes::WebReply::headers | ( | ) | const |
get headers.
Definition at line 104 of file reply.cpp.
Referenced by fawkes::dynamic_reply_free_cb().