Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Reading the headers in a websocket client #4
Comments
|
Hi raffaeler, The API I don't think we currently expose an API to access the HTTP headers. However, the library we build on (websocket++) does have this functionality: This will require some source code changes, but a clean API for fetching the underlying |
|
Hi ras,
While I could make a pull request for exposing the response headers, it would take more time (as I don't know anything about the details of the implementation, nor I would be able to build for all the supported platforms. |
|
|
Hi. Did anything come of this? I would also like to get at the websocket_client response header somehow ... |
|
Nope. You have three choices:
|

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Hi,
I am trying to read the headers right after the connect() in a websocket client app (rest-sdk 2.6).
auto config = client->config();
auto headers = config.headers();
The connect was successful, but the headers are always empty even if I can see them from wireshark.
As an additional information, I can't even see the server name (by default I understood that it should show up).
auto server_name = config.server_name();
My final target is to access the "Sec-WebSocket-Accept" string which should be used as an unique identifier of the connection.
Thank you