|
Fawkes API
Fawkes Development Version
|
REST reply via Webview. More...
#include <rest_api.h>

Public Member Functions | |
| WebviewRestReply (WebReply::Code code, const std::string &body="", const std::string &content_type="application/json") | |
| Constructor. More... | |
Public Member Functions inherited from fawkes::StaticWebReply | |
| 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... | |
Public Member Functions inherited from fawkes::WebReply | |
| 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... | |
REST reply via Webview.
Definition at line 47 of file rest_api.h.
|
inline |
Constructor.
| code | HTTP response code |
| body | body of reply, usually a JSON document. |
| content_type | content type of reply, defaults to application/json. When sending text error messages, set to text/plain. |
Definition at line 56 of file rest_api.h.
References fawkes::WebReply::add_header().