Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to add some custom key to the http headers #1125

Open
sorrylala opened this issue Jan 31, 2024 · 1 comment
Open

How to add some custom key to the http headers #1125

sorrylala opened this issue Jan 31, 2024 · 1 comment

Comments

@sorrylala
Copy link

I want to add some custom keys to the http headers of ws,I use websocketpp client,how can I do this, thank you!

@hzqst
Copy link

hzqst commented May 24, 2024

Just for reference.


				websocketpp::lib::error_code ec;

				auto conn = m_WebSocketClientPtr->get_connection(m_WebSocketConnectLocation, ec);

				if (!m_ClientId.empty())
				{
					conn->replace_header("ClientId", m_ClientId);
				}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants