28 #ifndef HTTP_PARSER_REQUEST_HPP 29 #define HTTP_PARSER_REQUEST_HPP 33 #include <websocketpp/common/memory.hpp> 34 #include <websocketpp/http/parser.hpp> 53 typedef lib::shared_ptr<type> ptr;
56 : m_buf(lib::make_shared<std::string>())
87 std::string
raw()
const;
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> size_t const istream_buffer
Number of bytes to use for temporary istream read buffers.
std::string const & get_uri() const
Return the requested URI.
void handle_accept(connection_ptr con, lib::error_code const &ec)
Handler callback for start_accept.
std::string raw_head() const
Returns the raw request headers only (similar to an HTTP HEAD request)
void set_uri(std::string const &uri)
Set the HTTP uri. Must be a valid HTTP uri.
std::string const & get_method() const
Return the request method.
Stores, parses, and manipulates HTTP requests.
size_t consume(char const *buf, size_t len)
Process bytes in the input buffer.
void set_method(std::string const &method)
Set the HTTP method. Must be a valid HTTP token.
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.