2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
42#ifndef WEB_HTTP_CONTENTDECODER_H
43#define WEB_HTTP_CONTENTDECODER_H
45#ifndef DOXYGEN_SHOULD_SKIP_THIS
67 virtual std::size_t
read() = 0;
ContentDecoder(const ContentDecoder &)=delete
ContentDecoder & operator=(ContentDecoder &&) noexcept=default
ContentDecoder & operator=(const ContentDecoder &)=delete
ContentDecoder(ContentDecoder &&) noexcept=default
virtual std::size_t read()=0
std::vector< char > content
virtual ~ContentDecoder()
std::vector< char > && getContent()
void setOption(const std::string &optionName, const std::string &optionValue)
CookieOptions(const std::string &value)
Parser(core::socket::stream::SocketContext *socketContext, const enum HTTPCompliance &compliance=HTTPCompliance::RFC2616|HTTPCompliance::RFC7230)
static const std::regex httpVersionRegex
std::size_t contentLength
CiStringMap< std::string > headers
std::list< web::http::ContentDecoder * > decoderQueue
TransferEncoding transferEncoding
std::vector< char > content
virtual void analyzeHeader()
static bool contains(int status)
std::function< void(Response &&)> onResponseParsed
ResponseParser(core::socket::stream::SocketContext *socketContext, const std::function< void()> &onResponseStart, const std::function< void(Response &&)> &onResponseParsed, const std::function< void(int, const std::string &)> &onResponseParseError)
void parseError(int code, const std::string &reason) override
void parseStartLine(const std::string &line) override
void analyzeHeader() override
Response && getResponse()
std::function< void()> onResponseStart
void parsingFinished() override
std::function< void(int, const std::string &)> onResponseParseError
CiStringMap< std::string > headers
CiStringMap< CookieOptions > cookies
ConnectionState connectionState
std::pair< std::string, std::string > str_split(const std::string &base, char c_middle)
std::string & str_trimm(std::string &text)
bool ciContains(const std::string &str1, const std::string &str2)