9 #ifndef _c08db816_ac02_484c_8e9a_ab816c5198c7
10 #define _c08db816_ac02_484c_8e9a_ab816c5198c7
34 std::string
const & http_version=
"",
35 unsigned int status=0, std::string
const & reason=
"",
36 Headers const & headers={}, std::string
const & body=
"");
63 std::string _http_version;
HTTP Response.
Definition: HTTPResponse.h:25
void set_http_version(std::string const &http_version)
Set the HTTP version.
void set_reason(std::string const &target)
Set the reason.
void set_status(unsigned int status)
Set the status.
HTTPResponse & operator=(HTTPResponse const &)=default
HTTPResponse(std::string const &http_version="", unsigned int status=0, std::string const &reason="", Headers const &headers={}, std::string const &body="")
Constructor.
HTTPResponse & operator=(HTTPResponse &&)=default
HTTPResponse(HTTPResponse &&)=default
HTTPResponse(HTTPResponse const &)=default
virtual ~HTTPResponse()=default
std::string const & get_http_version() const
Return the HTTP version.
unsigned int get_status() const
Return the status.
std::string const & get_reason() const
Return the reason.
RFC 5322 Message (i.e. headers with body).
Definition: Message.h:27
std::map< std::string, std::string > Headers
Associative container for headers.
Definition: Message.h:30
std::istream & operator>>(std::istream &stream, HTTPRequest &request)
Input an HTTP request from a stream.
std::ostream & operator<<(std::ostream &stream, HTTPRequest const &request)
Output an HTTP request to a stream.
Definition: Association.h:25
#define ODIL_API
Definition: odil.h:28