Public Member Functions |
| HTTPResponse (struct MHD_Connection *connection) |
void | Append (const std::string &data) |
void | SetContentType (const std::string &type) |
void | SetHeader (const std::string &key, const std::string &value) |
void | SetStatus (unsigned int status) |
void | SetNoCache () |
int | SendJson (const ola::web::JsonValue &json) |
int | Send () |
struct MHD_Connection * | Connection () const |
Member Function Documentation
int ola::http::HTTPResponse::Send |
( |
| ) |
|
Send the HTTP response
- Returns
- true on success, false on error
Send a JsonObject as the response.
- Returns
- true on success, false on error
void ola::http::HTTPResponse::SetContentType |
( |
const std::string & |
type | ) |
|
Set the content-type header
- Parameters
-
- Returns
- true if the header was set correctly, false otherwise
void ola::http::HTTPResponse::SetHeader |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
Set a header in the response
- Parameters
-
key | the header name |
value | the header value |
- Returns
- true if the header was set correctly, false otherwise
void ola::http::HTTPResponse::SetNoCache |
( |
| ) |
|
Set the appropriate headers so this response isn't cached
The documentation for this class was generated from the following files: