This class implements limited HTTP parser according to RFC7230 Supports:
More...
#include <http_parser.h>
|
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.
|
|
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.
std::string ugcs::vsm::Http_parser::Get_header_value |
( |
const std::string & |
name | ) |
const |
Get string value of header.
- Parameters
-
name | Header 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
-
The documentation for this class was generated from the following file: