libfilezilla
0.59.0
A cross-platform C++ library for asynchronous and networked applications
Toggle main menu visibility
Loading...
Searching...
No Matches
lib
libfilezilla
http
headers.hpp
Go to the documentation of this file.
1
#ifndef LIBFILEZILLA_HTTP_HEADERS_HEADER
2
#define LIBFILEZILLA_HTTP_HEADERS_HEADER
3
7
8
#include <map>
9
#include <optional>
10
11
#include "
../string.hpp
"
12
13
namespace
fz
{
14
15
class
uri
;
16
17
namespace
http {
18
19
enum class
continuation
20
{
21
next,
22
wait,
23
done,
24
error
25
};
26
27
typedef
std::map<std::string, std::string, less_insensitive_ascii> headers;
28
29
class
FZ_PUBLIC_SYMBOL
with_headers
30
{
31
public
:
32
virtual
~with_headers
();
33
34
std::optional<uint64_t> get_content_length()
const
;
35
37
void
set_content_length
(uint64_t l);
38
40
void
set_chunked_encoding
();
41
43
bool
chunked_encoding
()
const
;
44
45
void
set_content_type(std::string content_type);
46
47
std::string get_header(std::string
const
& key)
const
;
48
49
bool
keep_alive()
const
;
50
51
headers headers_;
52
};
53
55
std::string FZ_PUBLIC_SYMBOL
get_canonical_host
(
uri
const
&
uri
);
56
57
}
58
}
59
60
#endif
fz::http::with_headers
Definition
headers.hpp:30
fz::http::with_headers::set_chunked_encoding
void set_chunked_encoding()
Sets Transfer-Encoding to chunked. Also clears Content-Length.
fz::http::with_headers::set_content_length
void set_content_length(uint64_t l)
Sets Content-Lenght. Also clears Transfer-Encoding.
fz::http::with_headers::chunked_encoding
bool chunked_encoding() const
Whether chunked encoding is used.
fz::uri
The uri class is used to decompose URIs into their individual components.
Definition
uri.hpp:30
fz::http::get_canonical_host
std::string get_canonical_host(uri const &uri)
Canonicalizes the URI for use in the Host: header.
fz
The namespace used by libfilezilla.
Definition
apply.hpp:17
string.hpp
String types and assorted functions.
Generated by
1.18.0