Skip to content

websocketpp::http::parser

zaphoyd edited this page Nov 26, 2011 · 4 revisions

class parser provides a base class for more specific sorts of HTTP parsers. It provides functionality for reading and writing HTTP headers.

Types

See websocketpp::http for types defined globally for the websocketpp::http module.

Member functions

Signature Description
std::string get_header(const std::string& key) const Returns value of header with key key. Headers with multiple values will be returned as a single comma separated string.
void add_header(const std::string& key, const std::string& value) Adds a header with key key and value value. If a header with this key already exists value is appended to the existing key separated by a comma.
void replace_header(const std::string& key, const std::string& value) Adds a header with key key and value value. If a header with this key already exists it is replaced with the new value.
void remove_header(const std::string& key) Removes the header with key key. This is distinct from setting the value to blank.

Thread safety

Distinct Objects: Safe
Shared Objects: Unsafe

Requirements

Header: websocketpp/http/parser.hpp
Library: libwebsocketpp