Public Member Functions | Public Attributes
async_web_server_cpp::HttpRequest Struct Reference

#include <http_request.hpp>

List of all members.

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 >
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< HttpHeaderheaders
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

Detailed Description

Represents a request from a browser

Definition at line 16 of file http_request.hpp.


Member Function Documentation

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.

template<typename T >
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.


Member Data Documentation

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.

Definition at line 18 of file http_request.hpp.

Definition at line 24 of file http_request.hpp.

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.

Definition at line 19 of file http_request.hpp.


The documentation for this struct was generated from the following files:


async_web_server_cpp
Author(s): Mitchell Wills
autogenerated on Sat Jun 8 2019 18:56:51