You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zaphoyd edited this page Nov 27, 2011
·
1 revision
class websocketpp::http::request_reader provides functionality for reading HTTP requests.
Types
See websocketpp::http for types defined globally for the websocketpp::http module.
Member functions
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.