ZeroEQ  0.9.0
ZeroEQ - Zero Event Queue
zeroeq::http::Response Struct Reference

Response to an HTTP Request. More...

#include <response.h>

+ Collaboration diagram for zeroeq::http::Response:

Public Member Functions

 Response (const Code code_=Code::OK, const std::string &body_=std::string())
 Construct a Response with a given return code and payload. More...
 
 Response (const Code code_, const std::string &body_, const std::string &contentType)
 Construct a Response with a given code, payload and content type. More...
 
 Response (const Code code_, const std::string &body_, std::map< Header, std::string > headers_)
 Construct a Response with a given code, payload and map of headers. More...
 

Public Attributes

Code code
 HTTP return code. More...
 
std::string body
 Payload to return in a format specified in CONTENT_TYPE header. More...
 
std::map< Header, std::string > headers
 HTTP message headers. More...
 

Detailed Description

Response to an HTTP Request.

Definition at line 56 of file response.h.

Constructor & Destructor Documentation

zeroeq::http::Response::Response ( const Code  code_ = Code::OK,
const std::string &  body_ = std::string() 
)
inline

Construct a Response with a given return code and payload.

Definition at line 68 of file response.h.

zeroeq::http::Response::Response ( const Code  code_,
const std::string &  body_,
const std::string &  contentType 
)
inline

Construct a Response with a given code, payload and content type.

Definition at line 76 of file response.h.

zeroeq::http::Response::Response ( const Code  code_,
const std::string &  body_,
std::map< Header, std::string >  headers_ 
)
inline

Construct a Response with a given code, payload and map of headers.

Definition at line 85 of file response.h.

Member Data Documentation

std::string zeroeq::http::Response::body

Payload to return in a format specified in CONTENT_TYPE header.

Definition at line 62 of file response.h.

Code zeroeq::http::Response::code

HTTP return code.

Definition at line 59 of file response.h.

std::map<Header, std::string> zeroeq::http::Response::headers

HTTP message headers.

Definition at line 65 of file response.h.


The documentation for this struct was generated from the following file: