Odil
A C++11 library for the DICOM standard
Toggle main menu visibility
Loading...
Searching...
No Matches
HTTPRequest.h
Go to the documentation of this file.
1
/*************************************************************************
2
* odil - Copyright (C) Universite de Strasbourg
3
* Distributed under the terms of the CeCILL-B license, as published by
4
* the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6
* for details.
7
************************************************************************/
8
9
#ifndef _a927d586_9154_4f1e_bd56_82f2b6f0450d
10
#define _a927d586_9154_4f1e_bd56_82f2b6f0450d
11
12
#include <string>
13
14
#include "
odil/odil.h
"
15
#include "
odil/webservices/Message.h
"
16
#include "
odil/webservices/URL.h
"
17
18
namespace
odil
19
{
20
21
namespace
webservices
22
{
23
25
class
ODIL_API
HTTPRequest
:
public
Message
26
{
27
public
:
34
HTTPRequest
(
35
std::string
const
& method=
""
,
URL
const
& target={},
36
std::string
const
& http_version=
"HTTP/1.0"
,
37
Headers
const
& headers={}, std::string
const
& body=
""
);
38
39
HTTPRequest
(
HTTPRequest
const
&) =
default
;
40
HTTPRequest
(
HTTPRequest
&&) =
default
;
41
HTTPRequest
&
operator=
(
HTTPRequest
const
&) =
default
;
42
HTTPRequest
&
operator=
(
HTTPRequest
&&) =
default
;
43
virtual
~HTTPRequest
() =
default
;
44
46
std::string
const
&
get_method
()
const
;
47
49
void
set_method
(std::string
const
& method);
50
52
URL
const
&
get_target
()
const
;
53
55
void
set_target
(
URL
const
& target);
56
58
std::string
const
&
get_http_version
()
const
;
59
61
void
set_http_version
(std::string
const
& http_version);
62
63
private
:
64
std::string _method;
65
URL
_target;
66
std::string _http_version;
67
};
68
70
ODIL_API
71
std::istream &
72
operator>>
(std::istream & stream,
HTTPRequest
& request);
73
75
ODIL_API
std::ostream &
76
operator<<
(std::ostream & stream,
HTTPRequest
const
& request);
77
78
}
79
80
}
81
82
#endif
// _a927d586_9154_4f1e_bd56_82f2b6f0450d
URL.h
odil::webservices::HTTPRequest
HTTP request.
Definition
HTTPRequest.h:26
odil::webservices::HTTPRequest::get_http_version
std::string const & get_http_version() const
Return the HTTP version.
odil::webservices::HTTPRequest::HTTPRequest
HTTPRequest(HTTPRequest &&)=default
odil::webservices::HTTPRequest::operator=
HTTPRequest & operator=(HTTPRequest &&)=default
odil::webservices::HTTPRequest::get_method
std::string const & get_method() const
Return the method.
odil::webservices::HTTPRequest::get_target
URL const & get_target() const
Return the target.
odil::webservices::HTTPRequest::set_method
void set_method(std::string const &method)
Set the method.
odil::webservices::HTTPRequest::operator=
HTTPRequest & operator=(HTTPRequest const &)=default
odil::webservices::HTTPRequest::set_http_version
void set_http_version(std::string const &http_version)
Set the HTTP version.
odil::webservices::HTTPRequest::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.
odil::webservices::HTTPRequest::set_target
void set_target(URL const &target)
Set the target.
odil::webservices::HTTPRequest::~HTTPRequest
virtual ~HTTPRequest()=default
odil::webservices::HTTPRequest::HTTPRequest
HTTPRequest(HTTPRequest const &)=default
odil::webservices::Message::Message
Message(Headers const &headers={}, std::string const &body="")
Constructor.
odil::webservices
Definition
BulkData.h:20
odil::webservices::operator>>
std::istream & operator>>(std::istream &stream, HTTPRequest &request)
Input an HTTP request from a stream.
odil::webservices::operator<<
std::ostream & operator<<(std::ostream &stream, HTTPRequest const &request)
Output an HTTP request to a stream.
odil
Definition
Association.h:25
odil.h
ODIL_API
#define ODIL_API
Definition
odil.h:28
odil::webservices::URL
Uniform resource locator.
Definition
URL.h:26
Message.h
src
odil
webservices
HTTPRequest.h
Generated by
1.17.0