diff --git a/changelog.md b/changelog.md index c929ce433f..8dc43e2be8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,7 @@ HEAD -- Fix issue compiling with WEBSOCKETPP_STRICT_MASKING +- Add `get_request()` pass through method to connection to allow calling methods + specific to the HTTP policy in use. +- Fix issue compiling with `WEBSOCKETPP_STRICT_MASKING` - Add additional macro guards for use with boost_config. Thank you breyed for testing and code. #261 diff --git a/websocketpp/connection.hpp b/websocketpp/connection.hpp index 50f89c9591..248bd1a9fe 100644 --- a/websocketpp/connection.hpp +++ b/websocketpp/connection.hpp @@ -833,6 +833,24 @@ public: */ void remove_header(const std::string &key); + /// Get request object + /** + * Direct access to request object. This can be used to call methods of the + * request object that are not part of the standard request API that + * connection wraps. + * + * Note use of this method involves using behavior specific to the + * configured HTTP policy. Such behavior may not work with alternate HTTP + * policies. + * + * @since 0.3.0-alpha3 + * + * @return A const reference to the raw request object + */ + request_type const & get_request() const { + return m_request; + } + ///////////////////////////////////////////////////////////// // Pass-through access to the other connection information // /////////////////////////////////////////////////////////////