Odil
A C++11 library for the DICOM standard
|
HTTP request. More...
#include <HTTPRequest.h>
Public Member Functions | |
HTTPRequest (std::string const &method="", URL const &target={}, std::string const &http_version="HTTP/1.0", Headers const &headers={}, std::string const &body="") | |
Constructor. More... | |
HTTPRequest (HTTPRequest const &)=default | |
HTTPRequest (HTTPRequest &&)=default | |
HTTPRequest & | operator= (HTTPRequest const &)=default |
HTTPRequest & | operator= (HTTPRequest &&)=default |
virtual | ~HTTPRequest ()=default |
std::string const & | get_method () const |
Return the method. More... | |
void | set_method (std::string const &method) |
Set the method. More... | |
URL const & | get_target () const |
Return the target. More... | |
void | set_target (URL const &target) |
Set the target. 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... | |
![]() | |
Message (Headers const &headers={}, std::string const &body="") | |
Constructor. More... | |
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. 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 request.
odil::webservices::HTTPRequest::HTTPRequest | ( | std::string const & | method = "" , |
URL const & | target = {} , |
||
std::string const & | http_version = "HTTP/1.0" , |
||
Headers const & | headers = {} , |
||
std::string const & | body = "" |
||
) |
Constructor.
By default, method, target are empty, and HTTP version default to "HTTP/1.0".
|
default |
|
default |
|
virtualdefault |
std::string const& odil::webservices::HTTPRequest::get_http_version | ( | ) | const |
Return the HTTP version.
std::string const& odil::webservices::HTTPRequest::get_method | ( | ) | const |
Return the method.
URL const& odil::webservices::HTTPRequest::get_target | ( | ) | const |
Return the target.
|
default |
|
default |
void odil::webservices::HTTPRequest::set_http_version | ( | std::string const & | http_version | ) |
Set the HTTP version.
void odil::webservices::HTTPRequest::set_method | ( | std::string const & | method | ) |
Set the method.
void odil::webservices::HTTPRequest::set_target | ( | URL const & | target | ) |
Set the target.