Electroneum
epee::net_utils::http Namespace Reference

Classes

struct  custum_handler_config
 
class  http_client_auth
 Implements RFC 2617 digest auth. Digests from RFC 7616 can be added. More...
 
class  http_custom_handler
 
struct  http_header_info
 
struct  http_request_info
 
struct  http_response_info
 
class  http_server_auth
 Implements RFC 2617 digest auth. Digests from RFC 7616 can be added. More...
 
struct  http_server_config
 
class  http_simple_client_template
 
struct  i_http_server_handler
 
struct  login
 
class  simple_http_connection_handler
 
struct  uri_content
 
struct  url_content
 

Typedefs

typedef std::list< std::pair< std::string, std::string > > fields_list
 
typedef http_simple_client_template< blocked_mode_clienthttp_simple_client
 

Enumerations

enum  http_method {
  http_method_options, http_method_get, http_method_post, http_method_put,
  http_method_head, http_method_etc, http_method_unknown
}
 
enum  http_content_type { http_content_type_text_html, http_content_type_image_gif, http_content_type_other, http_content_type_not_set }
 

Functions

std::string get_value_from_fields_list (const std::string &param_name, const net_utils::http::fields_list &fields)
 
std::string get_value_from_uri_line (const std::string &param_name, const std::string &uri)
 

Typedef Documentation

◆ fields_list

typedef std::list<std::pair<std::string, std::string> > epee::net_utils::http::fields_list

Definition at line 66 of file http_base.h.

◆ http_simple_client

Enumeration Type Documentation

◆ http_content_type

◆ http_method

Function Documentation

◆ get_value_from_fields_list()

std::string epee::net_utils::http::get_value_from_fields_list ( const std::string &  param_name,
const net_utils::http::fields_list fields 
)
inline

Definition at line 69 of file http_base.h.

70  {
71  fields_list::const_iterator it = fields.begin();
72  for(; it != fields.end(); it++)
73  if(!string_tools::compare_no_case(param_name, it->first))
74  break;
75 
76  if(it==fields.end())
77  return std::string();
78 
79  return it->second;
80  }
::std::string string
Definition: gtest-port.h:1097
bool compare_no_case(const std::string &str1, const std::string &str2)
Definition: string_tools.h:221
Here is the call graph for this function:

◆ get_value_from_uri_line()

std::string epee::net_utils::http::get_value_from_uri_line ( const std::string &  param_name,
const std::string &  uri 
)
inline

Definition at line 84 of file http_base.h.

85  {
86  std::string buff = "([\\?|&])";
87  buff += param_name + "=([^&]*)";
88  boost::regex match_param(buff.c_str(), boost::regex::icase | boost::regex::normal);
89  boost::smatch result;
90  if(boost::regex_search(uri, result, match_param, boost::match_default) && result[0].matched)
91  {
92  return result[2];
93  }
94  return std::string();
95  }
::std::string string
Definition: gtest-port.h:1097