#include <http_request.hpp>
Public Member Functions | |
std::string | get_header_value_or_default (const std::string &name, const std::string &default_value) const |
std::string | get_query_param_value_or_default (const std::string &name, const std::string &default_value) const |
template<typename T > | |
T | get_query_param_value_or_default (const std::string &name, const T &default_value) const |
bool | has_header (const std::string &name) const |
bool | has_query_param (const std::string &name) const |
bool | parse_uri () |
Public Attributes | |
std::vector< HttpHeader > | headers |
int | http_version_major |
int | http_version_minor |
std::string | method |
std::string | path |
std::string | query |
std::map< std::string, std::string > | query_params |
std::string | uri |
Represents a request from a browser
Definition at line 18 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::get_header_value_or_default | ( | const std::string & | name, |
const std::string & | default_value | ||
) | const |
Definition at line 62 of file http_request.cpp.
std::string async_web_server_cpp::HttpRequest::get_query_param_value_or_default | ( | const std::string & | name, |
const std::string & | default_value | ||
) | const |
Definition at line 82 of file http_request.cpp.
|
inline |
Definition at line 43 of file http_request.hpp.
bool async_web_server_cpp::HttpRequest::has_header | ( | const std::string & | name | ) | const |
Definition at line 50 of file http_request.cpp.
bool async_web_server_cpp::HttpRequest::has_query_param | ( | const std::string & | name | ) | const |
Definition at line 75 of file http_request.cpp.
bool async_web_server_cpp::HttpRequest::parse_uri | ( | ) |
Definition at line 12 of file http_request.cpp.
std::vector<HttpHeader> async_web_server_cpp::HttpRequest::headers |
Definition at line 24 of file http_request.hpp.
int async_web_server_cpp::HttpRequest::http_version_major |
Definition at line 22 of file http_request.hpp.
int async_web_server_cpp::HttpRequest::http_version_minor |
Definition at line 23 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::method |
Definition at line 20 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::path |
Definition at line 26 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::query |
Definition at line 27 of file http_request.hpp.
std::map<std::string, std::string> async_web_server_cpp::HttpRequest::query_params |
Definition at line 28 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::uri |
Definition at line 21 of file http_request.hpp.