IOLink
IOL_v1.1.0_release
HTTPHeaders.h
1
#pragma once
2
3
#include <array>
4
#include <initializer_list>
5
#include <string>
6
7
#include <iolink/IOLinkAPI.h>
8
9
namespace
iolink
10
{
11
15
class
IOLINK_API
HTTPHeaders
16
{
17
public
:
21
struct
Entry
22
{
23
std::string name;
24
std::string value;
25
};
26
30
HTTPHeaders
();
31
38
HTTPHeaders
(
const
Entry
* values,
size_t
count);
39
43
HTTPHeaders
(std::initializer_list<Entry> init);
44
45
HTTPHeaders
(
const
HTTPHeaders
& other);
46
HTTPHeaders
& operator=(
const
HTTPHeaders
& other);
47
48
HTTPHeaders
(
HTTPHeaders
&& other) noexcept;
49
HTTPHeaders
& operator=(
HTTPHeaders
&& other) noexcept;
50
51
~
HTTPHeaders
();
52
56
size_t
size()
const
;
57
61
Entry
at(
size_t
i)
const
;
62
66
inline
Entry
operator[]
(
size_t
i)
const
{
return
at(i); }
67
71
void
add(
const
Entry& entry);
72
76
inline
void
add
(
const
std::string& name,
const
std::string& value) {
add
(
Entry
{name, value}); }
77
78
private
:
79
class
Private;
80
Private* m_private;
81
};
82
83
}
// namespace iolink
iolink::HTTPHeaders::add
void add(const std::string &name, const std::string &value)
Add a new entry in the hedaer set by giving its name and value.
Definition:
HTTPHeaders.h:76
iolink
All IOLink symbols are enclosed in this namespace.
Definition:
ArrayX.h:7
iolink::HTTPHeaders::operator[]
Entry operator[](size_t i) const
Return the element at the given index.
Definition:
HTTPHeaders.h:66
iolink::HTTPHeaders::Entry
An entry of the HTTP header set.
Definition:
HTTPHeaders.h:21
iolink::HTTPHeaders
A class used to pass HTTP headers as input of factories methods.
Definition:
HTTPHeaders.h:15
iolink
public
include
iolink
storage
HTTPHeaders.h
Generated on Tue Apr 26 2022 13:38:47 for IOLink by
1.8.17