Odil
A C++11 library for the DICOM standard
Public Member Functions | List of all members
odil::webservices::HTTPRequest Class Reference

HTTP request. More...

#include <HTTPRequest.h>

Inheritance diagram for odil::webservices::HTTPRequest:
Inheritance graph
[legend]
Collaboration diagram for odil::webservices::HTTPRequest:
Collaboration graph
[legend]

Public Member Functions

 HTTPRequest (std::string const &method="", URL const &target=URL(), std::string const &http_version="HTTP/1.0", Headers const &headers=Headers(), std::string const &body="")
 Constructor. More...
 
virtual ~HTTPRequest ()
 Destructor. More...
 
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...
 
- Public Member Functions inherited from odil::webservices::Message
 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

- Public Types inherited from odil::webservices::Message
typedef std::map< std::string, std::string > Headers
 Associative container for headers. More...
 

Detailed Description

HTTP request.

Constructor & Destructor Documentation

◆ HTTPRequest()

odil::webservices::HTTPRequest::HTTPRequest ( std::string const &  method = "",
URL const &  target = URL(),
std::string const &  http_version = "HTTP/1.0",
Headers const &  headers = Headers(),
std::string const &  body = "" 
)

Constructor.

By default, method, target are empty, and HTTP version default to "HTTP/1.0".

◆ ~HTTPRequest()

virtual odil::webservices::HTTPRequest::~HTTPRequest ( )
virtual

Destructor.

Member Function Documentation

◆ get_http_version()

std::string const& odil::webservices::HTTPRequest::get_http_version ( ) const

Return the HTTP version.

◆ get_method()

std::string const& odil::webservices::HTTPRequest::get_method ( ) const

Return the method.

◆ get_target()

URL const& odil::webservices::HTTPRequest::get_target ( ) const

Return the target.

◆ set_http_version()

void odil::webservices::HTTPRequest::set_http_version ( std::string const &  http_version)

Set the HTTP version.

◆ set_method()

void odil::webservices::HTTPRequest::set_method ( std::string const &  method)

Set the method.

◆ set_target()

void odil::webservices::HTTPRequest::set_target ( URL const &  target)

Set the target.


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