title: How do we read headers from boost websocket servers in C++
body: <p>Ive been trying to write a server for a client that uses websockets. 
  Currently the client code is similar to : </p>
  
  <pre><code>ws.async_handshake_ex(handshake_response,hostname,"/",
  [this](websocket::request_type&amp; request) { 
  request.set("header1","value1");
  request.set("header2","value2");
  },
  function_after_handshake());
  </code></pre>
  
  <p>Now, on my server side I've been trying to use these values of headers. I've been trying to write code like so : </p>
  
  <pre><code>ws.async_accept_ex(
        [this](websocket::response_type&amp; res) {
           cout&lt;&lt;res.base().get("header1");
        },
        function_after_handshake_server());
  </code></pre>
  
  <p>Obviously this is wrong, but what would be the correct way to do this on server side?
  I cannot change client code(totally not mine), and thus can't use latest versions of boost.</p>