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

Add HTTPClientResponse.switchProtocol() #945

Merged
merged 1 commit into from
May 1, 2015

Conversation

lultimouomo
Copy link
Contributor

Replaces #929 which I accidentally opened on my master branch.

Since the response does not have access to the request headers,
the expected protocol must be supplied as a parameter.

This is needed, for instance, to create client-side websockets.

@s-ludwig
Copy link
Member

Maybe switchProtocol would be a better naming choice, because it would be consistent with HTTPServerResponse.switchProtocol. Other than that, I just noticed that for both, HTTPServerRespose and HTTPClientResponse, an additional overload taking a scoped delegate to handle the connection would be good to have, to avoid the GC new. But that is independent of this pull request.

Since the response does not have access to the request headers,
the expected protocol must be supplied as a parameter.

Signed-off-by: Luca Niccoli <[email protected]>
@lultimouomo lultimouomo changed the title Add HTTPClientResponse.upgradeConnection() Add HTTPClientResponse.switchProtocol() Feb 23, 2015
s-ludwig added a commit that referenced this pull request May 1, 2015
Add HTTPClientResponse.switchProtocol()
@s-ludwig s-ludwig merged commit 83ba753 into vibe-d:master May 1, 2015
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.

3 participants