#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 16 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 59 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 77 of file http_request.cpp.
T async_web_server_cpp::HttpRequest::get_query_param_value_or_default | ( | const std::string & | name, |
const T & | default_value | ||
) | const [inline] |
Definition at line 40 of file http_request.hpp.
bool async_web_server_cpp::HttpRequest::has_header | ( | const std::string & | name | ) | const |
Definition at line 49 of file http_request.cpp.
bool async_web_server_cpp::HttpRequest::has_query_param | ( | const std::string & | name | ) | const |
Definition at line 71 of file http_request.cpp.
Definition at line 11 of file http_request.cpp.
std::vector<HttpHeader> async_web_server_cpp::HttpRequest::headers |
Definition at line 22 of file http_request.hpp.
Definition at line 20 of file http_request.hpp.
Definition at line 21 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::method |
Definition at line 18 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::path |
Definition at line 24 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::query |
Definition at line 25 of file http_request.hpp.
std::map<std::string, std::string> async_web_server_cpp::HttpRequest::query_params |
Definition at line 26 of file http_request.hpp.
std::string async_web_server_cpp::HttpRequest::uri |
Definition at line 19 of file http_request.hpp.