forked from zaphoyd/websocketpp
-
Notifications
You must be signed in to change notification settings - Fork 0
websocketpp::http::request_reader
zaphoyd edited this page Nov 27, 2011
·
1 revision
class websocketpp::http::request_reader
provides functionality for reading HTTP requests.
See websocketpp::http
for types defined globally for the websocketpp::http
module.
Signature | Description |
request() |
Default constructor initializes to a NULL state that is not valid for reading. |
void consume(std::istream& input) |
Consumes bytes from input until \r\n\r\n or EOF. Throws an http::exception if the parser determines that the request so far cannot be a valid HTTP request. |
bool ready() |
Returns whether or not the request paser is in a valid state for reading. Invalid states are: default constructed before reset has been called, after consume has been called but before enough data has been consumed to represent a complete HTTP request. |
std::string get_method() const |
Returns the value of the current HTTP request method. E.g. GET, POST, etc |
std::string get_uri() const |
Returns the value of the current HTTP request uri/resource |
std::string get_request() const |
Compiles the current request and returns the raw source HTTP request source. |
std::string get_header(const std::string& key) const |
Returns the value of the header with key key . |
Distinct Objects: Safe
Shared Objects: Unsafe
Header: websocketpp/http/parser.hpp
Library: libwebsocketpp