Odil
A C++11 library for the DICOM standard
|
HTTP Response. More...
#include <HTTPResponse.h>
Public Member Functions | |
HTTPResponse (std::string const &http_version="", unsigned int status=0, std::string const &reason="", Headers const &headers={}, std::string const &body="") | |
Constructor. | |
HTTPResponse (HTTPResponse const &)=default | |
HTTPResponse (HTTPResponse &&)=default | |
HTTPResponse & | operator= (HTTPResponse const &)=default |
HTTPResponse & | operator= (HTTPResponse &&)=default |
virtual | ~HTTPResponse ()=default |
std::string const & | get_http_version () const |
Return the HTTP version. | |
void | set_http_version (std::string const &http_version) |
Set the HTTP version. | |
unsigned int | get_status () const |
Return the status. | |
void | set_status (unsigned int status) |
Set the status. | |
std::string const & | get_reason () const |
Return the reason. | |
void | set_reason (std::string const &target) |
Set the reason. | |
![]() | |
Message (Headers const &headers={}, std::string const &body="") | |
Constructor. | |
Message (Message const &)=default | |
Message (Message &&)=default | |
Message & | operator= (Message const &)=default |
Message & | operator= (Message &&)=default |
virtual | ~Message ()=default |
Headers const & | get_headers () const |
Return the headers. | |
void | set_headers (Headers const &headers) |
Set the headers. | |
bool | has_header (std::string const &name) const |
Test whether the given header exists. | |
std::string const & | get_header (std::string const &name) const |
Return a header value or throw an exception if the required header is missing. | |
void | set_header (std::string const &name, std::string const &value) |
Set a header value. | |
std::string const & | get_body () const |
Return the body. | |
void | set_body (std::string const &body) |
Set the body. | |
Additional Inherited Members | |
![]() | |
typedef std::map< std::string, std::string > | Headers |
Associative container for headers. | |
HTTP Response.
odil::webservices::HTTPResponse::HTTPResponse | ( | std::string const & | http_version = "" , |
unsigned int | status = 0 , |
||
std::string const & | reason = "" , |
||
Headers const & | headers = {} , |
||
std::string const & | body = "" |
||
) |
Constructor.
By default, HTTP version and reason default to "" and status to 0 "HTTP/1.0".
|
default |
|
default |
|
virtualdefault |
std::string const & odil::webservices::HTTPResponse::get_http_version | ( | ) | const |
Return the HTTP version.
std::string const & odil::webservices::HTTPResponse::get_reason | ( | ) | const |
Return the reason.
unsigned int odil::webservices::HTTPResponse::get_status | ( | ) | const |
Return the status.
|
default |
|
default |
void odil::webservices::HTTPResponse::set_http_version | ( | std::string const & | http_version | ) |
Set the HTTP version.
void odil::webservices::HTTPResponse::set_reason | ( | std::string const & | target | ) |
Set the reason.
void odil::webservices::HTTPResponse::set_status | ( | unsigned int | status | ) |
Set the status.