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

HTTP Response. More...

#include <HTTPResponse.h>

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

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. More...
 
 HTTPResponse (HTTPResponse const &)=default
 
 HTTPResponse (HTTPResponse &&)=default
 
HTTPResponseoperator= (HTTPResponse const &)=default
 
HTTPResponseoperator= (HTTPResponse &&)=default
 
virtual ~HTTPResponse ()=default
 
const std::string & 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...
 
const std::string & get_reason () const
 Return the reason. More...
 
void set_reason (std::string const &target)
 Set the reason. More...
 
- Public Member Functions inherited from odil::webservices::Message
 Message (Headers const &headers={}, std::string const &body="")
 Constructor. More...
 
 Message (Message const &)=default
 
 Message (Message &&)=default
 
Messageoperator= (Message const &)=default
 
Messageoperator= (Message &&)=default
 
virtual ~Message ()=default
 
const Headersget_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...
 
const std::string & 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...
 
const std::string & 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 Response.

Constructor & Destructor Documentation

◆ HTTPResponse() [1/3]

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".

◆ HTTPResponse() [2/3]

odil::webservices::HTTPResponse::HTTPResponse ( HTTPResponse const &  )
default

◆ HTTPResponse() [3/3]

odil::webservices::HTTPResponse::HTTPResponse ( HTTPResponse &&  )
default

◆ ~HTTPResponse()

virtual odil::webservices::HTTPResponse::~HTTPResponse ( )
virtualdefault

Member Function Documentation

◆ get_http_version()

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

Return the HTTP version.

◆ get_reason()

const std::string& odil::webservices::HTTPResponse::get_reason ( ) const

Return the reason.

◆ get_status()

unsigned int odil::webservices::HTTPResponse::get_status ( ) const

Return the status.

◆ operator=() [1/2]

HTTPResponse& odil::webservices::HTTPResponse::operator= ( HTTPResponse &&  )
default

◆ operator=() [2/2]

HTTPResponse& odil::webservices::HTTPResponse::operator= ( HTTPResponse const &  )
default

◆ set_http_version()

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

Set the HTTP version.

◆ set_reason()

void odil::webservices::HTTPResponse::set_reason ( std::string const &  target)

Set the reason.

◆ set_status()

void odil::webservices::HTTPResponse::set_status ( unsigned int  status)

Set the status.


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