23 #ifndef __LIBS_WEBVIEW_REPLY_H_ 24 #define __LIBS_WEBVIEW_REPLY_H_ 107 void add_header(std::string header, std::string content);
109 const HeaderMap &
headers()
const;
119 static bool __caching;
128 virtual size_t chunk_size();
129 virtual size_t size() = 0;
130 virtual size_t next_chunk(
size_t pos,
char *buffer,
size_t buf_max_size) = 0;
138 void append_body(
const char *format, ...);
141 virtual const std::string & body();
142 virtual std::string::size_type body_length();
const HeaderMap & headers() const
get headers.
void set_request(WebRequest *request)
Set associated request.
virtual ~WebReply()
Destructor.
WebRequest * get_request() const
Get associated request.
Fawkes library namespace.
void add_header(std::string header, std::string content)
Add a HTTP header.
WebReply(Code code)
Constructor.
std::string _body
Body of the reply.
BANDWIDTH_LIMIT_EXCEEDED.
NON_AUTHORITATIVE_INFORMATION.
Code code() const
Get response code.
HTTP_VERSION_NOT_SUPPORTED.
static void set_caching(bool caching)
Enable or disable caching for all consecutive replies.
REQUEST_ENTITY_TOO_LARGE.
std::map< std::string, std::string > HeaderMap
Map of headers.
Web request meta data carrier.
PROXY_AUTHENTICATION_REQUIRED.
REQUESTED_RANGE_NOT_SATISFIABLE.