Skip to content

Make it possible to set the user agent for websockets #606

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

Merged
merged 3 commits into from
Jan 24, 2018

Conversation

MathyV
Copy link
Contributor

@MathyV MathyV commented Nov 14, 2017

Since I don't have a box to test winrt implementation I can't add/test that unfortunately

@msftclas
Copy link

msftclas commented Nov 14, 2017

CLA assistant check
All CLA requirements met.

@garethsb
Copy link
Contributor

garethsb commented Dec 7, 2017

I'm not sure, but can this be done already with my_config.headers().add(web::http::header_names::user_agent, my_user_agent)?

@MathyV
Copy link
Contributor Author

MathyV commented Dec 7, 2017

I tried but websocketpp overwrites it as far as I can tell if you don't specify it explicitly.

@ras0219-msft ras0219-msft merged commit 859292a into microsoft:master Jan 24, 2018
@ras0219-msft
Copy link
Contributor

Thanks for the PR!

I changed the new set API to use the headers structure to pass the user agent in -- this makes @garethsb-sony's snippet work (as one would expect) but also provides the more friendly set_user_agent() API.

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

Successfully merging this pull request may close these issues.

4 participants