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=Headers(), std::string const &body="") | |
Constructor. More... | |
virtual | ~HTTPResponse () |
Destructor. More... | |
std::string const & | get_http_version () const |
Return the HTTP version. More... | |
void | set_http_version (std::string const &http_version) |
Set the HTTP version. More... | |
unsigned int | get_status () const |
Return the status. More... | |
void | set_status (unsigned int status) |
Set the status. More... | |
std::string const & | get_reason () const |
Return the reason. More... | |
void | set_reason (std::string const &target) |
Set the reason. More... | |
![]() | |
Message (Headers const &headers=Headers(), std::string const &body="") | |
Constructor. More... | |
virtual | ~Message () |
Destructor. More... | |
Headers const & | get_headers () const |
Return the headers. More... | |
void | set_headers (Headers const &headers) |
Set the headers. More... | |
bool | has_header (std::string const &name) const |
Test whether the given header exists. More... | |
std::string const & | get_header (std::string const &name) const |
Return a header value or throw an exception if the required header is missing. More... | |
void | set_header (std::string const &name, std::string const &value) |
Set a header value. More... | |
std::string const & | get_body () const |
Return the body. More... | |
void | set_body (std::string const &body) |
Set the body. More... | |
Additional Inherited Members | |
![]() | |
typedef std::map< std::string, std::string > | Headers |
Associative container for headers. More... | |
HTTP Response.
odil::webservices::HTTPResponse::HTTPResponse | ( | std::string const & | http_version = "" , |
unsigned int | status = 0 , |
||
std::string const & | reason = "" , |
||
Headers const & | headers = Headers() , |
||
std::string const & | body = "" |
||
) |
Constructor.
By default, HTTP version and reason default to "" and status to 0 "HTTP/1.0".
|
virtual |
Destructor.
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.
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.