#include <Request.h>
Public Member Functions | |
| Request (const std::string &connectionName, const std::string &host) | |
| Request (Request &)=delete | |
| Request & | operator= (Request &)=delete |
| Request & | operator= (Request &&) noexcept=delete |
| std::string | getConnectionName () const |
| Request & | host (const std::string &hostFieldValue) |
| Request & | append (const std::string &field, const std::string &value) |
| Request & | set (const std::string &field, const std::string &value, bool overwrite=true) |
| Request & | set (const std::map< std::string, std::string > &headers, bool overwrite=true) |
| Request & | type (const std::string &type) |
| Request & | cookie (const std::string &name, const std::string &value) |
| Request & | cookie (const std::map< std::string, std::string > &cookies) |
| Request & | query (const std::string &key, const std::string &value) |
| Request & | setTrailer (const std::string &field, const std::string &value, bool overwrite=true) |
| std::string | header (const std::string &field) const |
| const std::map< std::string, std::string > & | getQueries () const |
| const CiStringMap< std::string > & | getHeaders () const |
| const CiStringMap< std::string > & | getTrailer () const |
| const CiStringMap< std::string > & | getCookies () const |
Public Attributes | |
| std::string | hostFieldValue |
| std::string | method = "GET" |
| std::string | url = "/" |
| int | httpMajor = 1 |
| int | httpMinor = 1 |
| std::size_t | count {0} |
Protected Member Functions | |
| Request (Request &&request) noexcept | |
Protected Attributes | |
| std::map< std::string, std::string > | queries |
| CiStringMap< std::string > | headers |
| CiStringMap< std::string > | cookies |
| CiStringMap< std::string > | trailer |
| std::string | connectionName |
| std::size_t | contentLength = 0 |
| TransferEncoding | transferEncoding = TransferEncoding::HTTP10 |
| ConnectionState | connectionState = ConnectionState::Default |
Friends | |
| class | MasterRequest |
| web::http::client::Request::Request | ( | const std::string & | connectionName, |
| const std::string & | host ) |
Definition at line 77 of file Request.cpp.
References connectionName, host(), hostFieldValue, and set().
Referenced by web::http::client::MasterRequest::MasterRequest().
|
explicitdelete |
|
explicitprotectednoexcept |
Definition at line 84 of file Request.cpp.
References connectionName, connectionState, contentLength, cookies, count, headers, host(), hostFieldValue, httpMajor, httpMinor, method, queries, set(), trailer, transferEncoding, and url.
Referenced by web::http::client::MasterRequest::MasterRequest().
| Request & web::http::client::Request::append | ( | const std::string & | field, |
| const std::string & | value ) |
Definition at line 131 of file Request.cpp.
References headers, and set().
| Request & web::http::client::Request::cookie | ( | const std::map< std::string, std::string > & | cookies | ) |
Definition at line 209 of file Request.cpp.
References cookie().
| Request & web::http::client::Request::cookie | ( | const std::string & | name, |
| const std::string & | value ) |
Definition at line 203 of file Request.cpp.
References cookies.
Referenced by cookie().
| std::string web::http::client::Request::getConnectionName | ( | ) | const |
Definition at line 105 of file Request.cpp.
References connectionName.
Referenced by main().
| const CiStringMap< std::string > & web::http::client::Request::getCookies | ( | ) | const |
Definition at line 260 of file Request.cpp.
References cookies.
Referenced by web::http::client::SocketContext::requestPrepared().
| const CiStringMap< std::string > & web::http::client::Request::getHeaders | ( | ) | const |
Definition at line 252 of file Request.cpp.
References headers.
Referenced by web::http::client::SocketContext::requestPrepared().
| const std::map< std::string, std::string > & web::http::client::Request::getQueries | ( | ) | const |
Definition at line 248 of file Request.cpp.
References queries.
Referenced by web::http::client::SocketContext::requestPrepared().
| const CiStringMap< std::string > & web::http::client::Request::getTrailer | ( | ) | const |
Definition at line 256 of file Request.cpp.
References trailer.
Referenced by web::http::client::SocketContext::requestPrepared().
| std::string web::http::client::Request::header | ( | const std::string & | field | ) | const |
Definition at line 242 of file Request.cpp.
References headers.
Referenced by web::websocket::client::SocketContextUpgradeFactory::create(), main(), web::http::client::MasterRequest::requestEventSource(), web::http::client::SocketContext::requestPrepared(), and web::http::client::MasterRequest::upgrade().
| Request & web::http::client::Request::host | ( | const std::string & | hostFieldValue | ) |
Definition at line 125 of file Request.cpp.
References set().
Referenced by Request(), and Request().
| Request & web::http::client::Request::query | ( | const std::string & | key, |
| const std::string & | value ) |
Definition at line 217 of file Request.cpp.
References queries.
| Request & web::http::client::Request::set | ( | const std::map< std::string, std::string > & | headers, |
| bool | overwrite = true ) |
Definition at line 189 of file Request.cpp.
References set().
| Request & web::http::client::Request::set | ( | const std::string & | field, |
| const std::string & | value, | ||
| bool | overwrite = true ) |
Definition at line 143 of file Request.cpp.
References web::http::Chunked, web::http::ciContains(), web::http::ciEquals(), web::http::Close, connectionState, contentLength, headers, web::http::Identity, web::http::Keep, and transferEncoding.
Referenced by append(), NextTester::dispatchNextRequest(), web::http::client::MasterRequest::executeSendFile(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), host(), main(), web::websocket::client::SocketContextUpgradeFactory::prepare(), Request(), Request(), web::http::client::MasterRequest::requestEventSource(), web::http::client::MasterRequest::send(), web::http::client::MasterRequest::send(), set(), and setTrailer().
| Request & web::http::client::Request::setTrailer | ( | const std::string & | field, |
| const std::string & | value, | ||
| bool | overwrite = true ) |
Definition at line 223 of file Request.cpp.
References headers, set(), and trailer.
| Request & web::http::client::Request::type | ( | const std::string & | type | ) |
Definition at line 197 of file Request.cpp.
References headers.
Referenced by main().
|
protected |
Definition at line 134 of file Request.h.
Referenced by web::http::client::MasterRequest::executeUpgrade(), getConnectionName(), Request(), and Request().
|
protected |
Definition at line 139 of file Request.h.
Referenced by web::http::client::MasterRequest::init(), Request(), and set().
|
protected |
Definition at line 136 of file Request.h.
Referenced by web::http::client::MasterRequest::executeSendFile(), web::http::client::MasterRequest::executeSendFragment(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::init(), Request(), web::http::client::MasterRequest::requestDelivered(), web::http::client::MasterRequest::sendFragment(), and set().
|
protected |
Definition at line 131 of file Request.h.
Referenced by cookie(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), getCookies(), web::http::client::MasterRequest::init(), and Request().
| std::size_t web::http::client::Request::count {0} |
Definition at line 126 of file Request.h.
Referenced by web::http::client::SocketContext::deliverResponse(), web::http::client::SocketContext::deliverResponseParseError(), web::http::client::SocketContext::initiateRequest(), Request(), web::http::client::SocketContext::requestCompleted(), web::http::client::SocketContext::requestDelivered(), and web::http::client::SocketContext::requestPrepared().
|
protected |
Definition at line 130 of file Request.h.
Referenced by append(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), getHeaders(), header(), web::http::client::MasterRequest::init(), Request(), set(), setTrailer(), and type().
| std::string web::http::client::Request::hostFieldValue |
| int web::http::client::Request::httpMajor = 1 |
Definition at line 123 of file Request.h.
Referenced by web::http::client::SocketContext::deliverResponse(), web::http::client::SocketContext::deliverResponseParseError(), web::http::client::MasterRequest::executeSendFile(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), web::http::client::MasterRequest::init(), web::http::client::SocketContext::initiateRequest(), Request(), web::http::client::SocketContext::requestCompleted(), web::http::client::SocketContext::requestDelivered(), web::http::client::MasterRequest::requestEventSource(), web::http::client::SocketContext::requestPrepared(), web::http::client::MasterRequest::upgrade(), and web::http::client::SocketContext::~SocketContext().
| int web::http::client::Request::httpMinor = 1 |
Definition at line 124 of file Request.h.
Referenced by web::http::client::SocketContext::deliverResponse(), web::http::client::SocketContext::deliverResponseParseError(), web::http::client::MasterRequest::executeSendFile(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), web::http::client::MasterRequest::init(), web::http::client::SocketContext::initiateRequest(), Request(), web::http::client::SocketContext::requestCompleted(), web::http::client::SocketContext::requestDelivered(), web::http::client::MasterRequest::requestEventSource(), web::http::client::SocketContext::requestPrepared(), web::http::client::MasterRequest::upgrade(), and web::http::client::SocketContext::~SocketContext().
| std::string web::http::client::Request::method = "GET" |
Definition at line 121 of file Request.h.
Referenced by web::http::client::SocketContext::deliverResponse(), web::http::client::SocketContext::deliverResponseParseError(), NextTester::dispatchNextRequest(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), web::http::client::MasterRequest::init(), web::http::client::SocketContext::initiateRequest(), main(), Request(), web::http::client::SocketContext::requestCompleted(), web::http::client::SocketContext::requestDelivered(), web::http::client::SocketContext::requestPrepared(), web::http::client::MasterRequest::upgrade(), and web::http::client::SocketContext::~SocketContext().
|
protected |
Definition at line 129 of file Request.h.
Referenced by web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), getQueries(), web::http::client::MasterRequest::init(), query(), and Request().
|
protected |
Definition at line 132 of file Request.h.
Referenced by web::http::client::MasterRequest::executeUpgrade(), getTrailer(), web::http::client::MasterRequest::init(), Request(), web::http::client::MasterRequest::requestDelivered(), and setTrailer().
|
protected |
Definition at line 138 of file Request.h.
Referenced by web::http::client::MasterRequest::executeSendFragment(), web::http::client::MasterRequest::init(), Request(), web::http::client::MasterRequest::requestDelivered(), and set().
| std::string web::http::client::Request::url = "/" |
Definition at line 122 of file Request.h.
Referenced by web::http::client::SocketContext::deliverResponse(), web::http::client::SocketContext::deliverResponseParseError(), NextTester::dispatchNextRequest(), web::http::client::MasterRequest::executeSendHeader(), web::http::client::MasterRequest::executeUpgrade(), web::http::client::MasterRequest::init(), web::http::client::SocketContext::initiateRequest(), main(), Request(), web::http::client::SocketContext::requestCompleted(), web::http::client::SocketContext::requestDelivered(), web::http::client::MasterRequest::requestEventSource(), web::http::client::SocketContext::requestPrepared(), web::http::client::MasterRequest::upgrade(), and web::http::client::SocketContext::~SocketContext().