1 #ifndef CPP_WEB_SERVER_HTTP_REQUEST_HPP 2 #define CPP_WEB_SERVER_HTTP_REQUEST_HPP 6 #include <boost/lexical_cast.hpp> 30 bool has_header(
const std::string& name)
const;
34 const std::string& default_value)
const;
40 const std::string& default_value)
const;
44 const T& default_value)
const 46 std::map<std::string, std::string>::const_iterator itr =
47 query_params.find(name);
48 if (itr != query_params.end())
52 return boost::lexical_cast<T>(itr->second);
54 catch (
const boost::bad_lexical_cast&)
std::map< std::string, std::string > query_params
std::string get_header_value_or_default(const std::string &name, const std::string &default_value) const
std::vector< HttpHeader > headers
T get_query_param_value_or_default(const std::string &name, const T &default_value) const
bool has_header(const std::string &name) const
std::string get_query_param_value_or_default(const std::string &name, const std::string &default_value) const
bool has_query_param(const std::string &name) const