Reduce multi-level calls of req.req members
Several places access the members of `req` indirectly like
`req.req.method()`. This can be simplified as `req.method()` .
This would also make the code clearer.
Tested:
- Compiles
- Redfish service validator passes
Change-Id: Ie129564ff907cdea7ac224b1e3d80cc0dedfbd7b
Signed-off-by: Myung Bae <myungbae@us.ibm.com>
diff --git a/http/websocket.hpp b/http/websocket.hpp
index d232c02..2ef8412 100644
--- a/http/websocket.hpp
+++ b/http/websocket.hpp
@@ -92,7 +92,8 @@
BMCWEB_LOG_DEBUG("starting connection {}", logPtr(this));
using bf = boost::beast::http::field;
- std::string protocolHeader = req.req[bf::sec_websocket_protocol];
+ std::string protocolHeader{
+ req.getHeaderValue(bf::sec_websocket_protocol)};
ws.set_option(boost::beast::websocket::stream_base::decorator(
[session{session},