Odil
A C++11 library for the DICOM standard
|
Go to the documentation of this file.
9 #ifndef _d7a272d7_9beb_43c1_a5a1_fce4c0245c80
10 #define _d7a272d7_9beb_43c1_a5a1_fce4c0245c80
30 typedef std::map<std::string, std::string>
Headers;
66 std::string
const &
get_header(std::string
const & name)
const;
69 void set_header(std::string
const & name, std::string
const & value);
81 Headers::const_iterator _find_header(std::string
const & name)
const;
98 #endif // _d7a272d7_9beb_43c1_a5a1_fce4c0245c80
Message(Message const &)=default
void set_header(std::string const &name, std::string const &value)
Set a header value.
std::ostream & operator<<(std::ostream &stream, HTTPRequest const &request)
Output an HTTP request to a stream.
Message & operator=(Message const &)=default
Definition: Association.h:25
#define ODIL_API
Definition: odil.h:28
bool has_header(std::string const &name) const
Test whether the given header exists.
Message(Message &&)=default
Message(Headers const &headers={}, std::string const &body="")
Constructor.
std::string const & get_body() const
Return the body.
std::string const & get_header(std::string const &name) const
Return a header value or throw an exception if the required header is missing.
std::map< std::string, std::string > Headers
Associative container for headers.
Definition: Message.h:30
void set_headers(Headers const &headers)
Set the headers.
Message & operator=(Message &&)=default
RFC 5322 Message (i.e. headers with body).
Definition: Message.h:27
virtual ~Message()=default
std::istream & operator>>(std::istream &stream, HTTPRequest &request)
Input an HTTP request from a stream.
Headers const & get_headers() const
Return the headers.
void set_body(std::string const &body)
Set the body.