This repository was archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
class request_parser
5cript edited this page Apr 25, 2021
·
7 revisions
| Members | Descriptions |
|---|---|
public request_parser() |
|
public bool feed(http_connection_interface * connection)
|
|
public request_header get_header() const
|
|
public bool finished() const |
|
public std::string & get_buffer() |
Returns the header buffer. |
public std::string read_front(size_type length) |
Returns the first 'length' bytes from the header buffer and remote this from the buffer. |
public bool is_buffer_empty() const |
|
public void rewind() |
Rewind the header parser to header entries. |
public boost::optional< std::string > get_field(std::string const & key) const |
public bool feed(http_connection_interface * connection)
Returns: Returns true if the parser finished parsing the header.
public request_header get_header() const
Returns: Returns the parsed header.
Returns: Returns true, if the header end was consumed by the parser.
Returns the header buffer.
The parser will consume from the front and upon finishing, this buffer will contain the rest that potentially contains the body.
Returns the first 'length' bytes from the header buffer and remote this from the buffer.
-
lengthThe amount of bytes to read and remove.
Returns: Returns the read string. Warning: this might be smaller than 'length'.
Returns: get_buffer().empty();
Rewind the header parser to header entries.
Required for 100-continue.
-
keyA header entry key, such as "Content-Length"
Returns: Returns the value associated with the key.