Skip to content
This repository was archived by the owner on Jun 1, 2026. It is now read-only.

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

Merged
Robert Schumacher (ras0219-msft) merged 3 commits into
microsoft:masterfrom
draca-be:websocket-user-agent
Jan 24, 2018
Merged

Make it possible to set the user agent for websockets#606
Robert Schumacher (ras0219-msft) merged 3 commits into
microsoft:masterfrom
draca-be:websocket-user-agent

Conversation

@MathyV

Copy link
Copy Markdown
Contributor

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

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Nov 14, 2017

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@garethsb

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

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

@ras0219-msft
Robert Schumacher (ras0219-msft) merged commit 859292a into microsoft:masterJan 24, 2018
@ras0219-msft

Copy link
Copy Markdown
Contributor

Thanks for the PR!

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

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@MathyV@msftclas@garethsb@ras0219-msft