WebSocket++
0.8.3-dev
C++ websocket client/server library
|
28 #ifndef HTTP_PARSER_REQUEST_HPP
29 #define HTTP_PARSER_REQUEST_HPP
33 #include <websocketpp/common/memory.hpp>
34 #include <websocketpp/http/parser.hpp>
50 class request :
public parser {
53 typedef lib::shared_ptr<type> ptr;
56 : m_buf(lib::make_shared<std::string>())
101 void set_uri(std::string
const & uri);
110 void process(std::string::iterator begin, std::string::iterator end);
112 lib::shared_ptr<std::string> m_buf;
113 std::string m_method;
122 #include <websocketpp/http/impl/request.hpp>
static std::vector< int > const versions_supported(helper, helper+4)
Container that stores the list of protocol versions supported.
std::string raw_head() const
Returns the raw request headers only (similar to an HTTP HEAD request)
std::string const & get_method() const
Return the request method.
void set_method(std::string const &method)
Set the HTTP method. Must be a valid HTTP token.
std::string const & get_uri() const
Return the requested URI.
void set_uri(std::string const &uri)
Set the HTTP uri. Must be a valid HTTP uri.
size_t consume(char const *buf, size_t len)
Process bytes in the input buffer.
std::string raw() const
Returns the full raw request (including the body)
bool ready() const
Returns whether or not the request is ready for reading.