HTTP Request data. More...
#include <userver/server/http/http_request.hpp>
Public Types | |
| using | HeadersMap = ::http::headers::HeaderMap | 
| using | HeadersMapKeys = decltype(utils::impl::MakeKeysView(HeadersMap())) | 
| using | CookiesMap = std::unordered_map< std::string, std::string, utils::StrCaseHash > | 
| using | CookiesMapKeys = decltype(utils::impl::MakeKeysView(CookiesMap())) | 
Public Member Functions | |
| HttpResponse & | GetHttpResponse () const | 
| Returns a container that should be filled with response data to this request.  | |
| const HttpMethod & | GetMethod () const | 
| const std::string & | GetMethodStr () const | 
| int | GetHttpMajor () const | 
| int | GetHttpMinor () const | 
| const std::string & | GetUrl () const | 
| const std::string & | GetRequestPath () const | 
| const std::string & | GetPathSuffix () const | 
| std::chrono::duration< double > | GetRequestTime () const | 
| std::chrono::duration< double > | GetResponseTime () const | 
| const std::string & | GetHost () const | 
| const std::string & | GetArg (const std::string &arg_name) const | 
| const std::vector< std::string > & | GetArgVector (const std::string &arg_name) const | 
| bool | HasArg (const std::string &arg_name) const | 
| size_t | ArgCount () const | 
| std::vector< std::string > | ArgNames () const | 
| const FormDataArg & | GetFormDataArg (const std::string &arg_name) const | 
| const std::vector< FormDataArg > & | GetFormDataArgVector (const std::string &arg_name) const | 
| bool | HasFormDataArg (const std::string &arg_name) const | 
| size_t | FormDataArgCount () const | 
| std::vector< std::string > | FormDataArgNames () const | 
| const std::string & | GetPathArg (const std::string &arg_name) const | 
| const std::string & | GetPathArg (size_t index) const | 
| bool | HasPathArg (const std::string &arg_name) const | 
| bool | HasPathArg (size_t index) const | 
| size_t | PathArgCount () const | 
| const std::string & | GetHeader (std::string_view header_name) const | 
| const std::string & | GetHeader (const ::http::headers::PredefinedHeader &header_name) const | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  | |
| const HeadersMap & | GetHeaders () const | 
| bool | HasHeader (std::string_view header_name) const | 
| bool | HasHeader (const ::http::headers::PredefinedHeader &header_name) const | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  | |
| size_t | HeaderCount () const | 
| HeadersMapKeys | GetHeaderNames () const | 
| void | RemoveHeader (std::string_view header_name) | 
| Removes the header with case insensitive name header_name.  | |
| void | RemoveHeader (const ::http::headers::PredefinedHeader &header_name) | 
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.  | |
| const std::string & | GetCookie (const std::string &cookie_name) const | 
| bool | HasCookie (const std::string &cookie_name) const | 
| size_t | CookieCount () const | 
| CookiesMapKeys | GetCookieNames () const | 
| const std::string & | RequestBody () const | 
| const HeadersMap & | RequestHeaders () const | 
| const CookiesMap & | RequestCookies () const | 
| void | SetResponseStatus (HttpStatus status) const | 
| Set the response status code.   | |
| bool | IsBodyCompressed () const | 
HTTP Request data.
Definition at line 33 of file http_request.hpp.
| using server::http::HttpRequest::CookiesMap = std::unordered_map<std::string, std::string, utils::StrCaseHash> | 
Definition at line 39 of file http_request.hpp.
| using server::http::HttpRequest::CookiesMapKeys = decltype(utils::impl::MakeKeysView(CookiesMap())) | 
Definition at line 42 of file http_request.hpp.
Definition at line 35 of file http_request.hpp.
| using server::http::HttpRequest::HeadersMapKeys = decltype(utils::impl::MakeKeysView(HeadersMap())) | 
Definition at line 37 of file http_request.hpp.
| size_t server::http::HttpRequest::ArgCount | ( | ) | const | 
| std::vector< std::string > server::http::HttpRequest::ArgNames | ( | ) | const | 
| size_t server::http::HttpRequest::CookieCount | ( | ) | const | 
| size_t server::http::HttpRequest::FormDataArgCount | ( | ) | const | 
| std::vector< std::string > server::http::HttpRequest::FormDataArgNames | ( | ) | const | 
| const std::string & server::http::HttpRequest::GetArg | ( | const std::string & | arg_name | ) | const | 
| const std::vector< std::string > & server::http::HttpRequest::GetArgVector | ( | const std::string & | arg_name | ) | const | 
| const std::string & server::http::HttpRequest::GetCookie | ( | const std::string & | cookie_name | ) | const | 
| CookiesMapKeys server::http::HttpRequest::GetCookieNames | ( | ) | const | 
| const FormDataArg & server::http::HttpRequest::GetFormDataArg | ( | const std::string & | arg_name | ) | const | 
| const std::vector< FormDataArg > & server::http::HttpRequest::GetFormDataArgVector | ( | const std::string & | arg_name | ) | const | 
| const std::string & server::http::HttpRequest::GetHeader | ( | std::string_view | header_name | ) | const | 
| HeadersMapKeys server::http::HttpRequest::GetHeaderNames | ( | ) | const | 
| const std::string & server::http::HttpRequest::GetHost | ( | ) | const | 
| int server::http::HttpRequest::GetHttpMajor | ( | ) | const | 
| int server::http::HttpRequest::GetHttpMinor | ( | ) | const | 
| const std::string & server::http::HttpRequest::GetPathArg | ( | const std::string & | arg_name | ) | const | 
| const std::string & server::http::HttpRequest::GetPathArg | ( | size_t | index | ) | const | 
| const std::string & server::http::HttpRequest::GetPathSuffix | ( | ) | const | 
| const std::string & server::http::HttpRequest::GetRequestPath | ( | ) | const | 
| const std::string & server::http::HttpRequest::GetUrl | ( | ) | const | 
| bool server::http::HttpRequest::HasArg | ( | const std::string & | arg_name | ) | const | 
| bool server::http::HttpRequest::HasCookie | ( | const std::string & | cookie_name | ) | const | 
| bool server::http::HttpRequest::HasFormDataArg | ( | const std::string & | arg_name | ) | const | 
| bool server::http::HttpRequest::HasHeader | ( | std::string_view | header_name | ) | const | 
| bool server::http::HttpRequest::HasPathArg | ( | const std::string & | arg_name | ) | const | 
| bool server::http::HttpRequest::HasPathArg | ( | size_t | index | ) | const | 
| size_t server::http::HttpRequest::HeaderCount | ( | ) | const | 
| bool server::http::HttpRequest::IsBodyCompressed | ( | ) | const | 
| size_t server::http::HttpRequest::PathArgCount | ( | ) | const | 
| const std::string & server::http::HttpRequest::RequestBody | ( | ) | const | 
| const CookiesMap & server::http::HttpRequest::RequestCookies | ( | ) | const | 
| const HeadersMap & server::http::HttpRequest::RequestHeaders | ( | ) | const | 
| void server::http::HttpRequest::SetResponseStatus | ( | HttpStatus | status | ) | const | 
Set the response status code.
Equivalent to this->GetHttpResponse().SetStatus(status).