VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ugcs::vsm::Http_parser Class Reference

This class implements limited HTTP parser according to RFC7230 Supports: More...

#include <http_parser.h>

Classes

struct  string_compare_ignore_case
 

Public Member Functions

bool Parse (std::istream &in)
 Parse http header from text stream. More...
 
bool Header_exists (const std::string &name) const
 Check if the header field with the specified name exists. More...
 
std::string Get_header_value (const std::string &name) const
 Get string value of header. More...
 
std::string Get_method () const
 Get HTTP method name.
 

Public Attributes

std::string parser_error
 

Detailed Description

This class implements limited HTTP parser according to RFC7230 Supports:

  • HTTP Method name
  • Header parsing in <name, value> pairs. name is case insensitive, value is trimmed. Does not support:
  • Header value folding.
  • URL and protocol string parsing from method/result line.

Member Function Documentation

std::string ugcs::vsm::Http_parser::Get_header_value ( const std::string &  name) const

Get string value of header.

Parameters
nameHeader name, case insensitive.
Returns
String value of header. "" if not present.
bool ugcs::vsm::Http_parser::Header_exists ( const std::string &  name) const

Check if the header field with the specified name exists.

bool ugcs::vsm::Http_parser::Parse ( std::istream &  in)

Parse http header from text stream.

Parameters
streamInput text stream.

The documentation for this class was generated from the following file: