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

Websocket support for handhake headers (such as:Sec-WebSocket-Protoco… #1607

Merged
merged 10 commits into from Dec 22, 2017

Conversation

Projects
None yet
6 participants
@jodagm
Contributor

jodagm commented Dec 20, 2017

@rossabaker following your guidance at http4s/http4s-websocket#7
I started with a minimal approach in the spirit of the existing WS API (thinking about current usage of WS), so I just added another overload with the additional headers. I moved WebSocketContext to the core alongside Websocket.

I could not make the compiler happy with the default responses as def, I would need your help to appease the implicit Gods :)

@rossabaker

Thanks! This looks good. A couple small suggestions.

@rossabaker

This comment has been minimized.

Show comment
Hide comment
@rossabaker

rossabaker Dec 21, 2017

Member

What does everybody think about the builder approach vs. the carrier solution? The carrier is a cleaner call when done right, but more complicated machinery if the call is made wrong.

Member

rossabaker commented Dec 21, 2017

What does everybody think about the builder approach vs. the carrier solution? The carrier is a cleaner call when done right, but more complicated machinery if the call is made wrong.

@rossabaker

This comment has been minimized.

Show comment
Hide comment
@rossabaker

rossabaker Dec 21, 2017

Member

Oops, I had missed the further conversation in my previous comment.

Member

rossabaker commented Dec 21, 2017

Oops, I had missed the further conversation in my previous comment.

@rossabaker

I think we should go ahead and deprecate the WS methods.

I think this code looks good. I think the open question is whether we prefer the builder or the partially applied techique. What's here:

WebSocketBuilder(send, recv).toHttpResponse

vs. @SystemFw's idea:

WebSocketBuilder.build(send, recv)
@aeons

This comment has been minimized.

Show comment
Hide comment
@aeons

aeons Dec 22, 2017

Member

I like the .build version.

Member

aeons commented Dec 22, 2017

I like the .build version.

jodagm added some commits Dec 22, 2017

@rossabaker

👍

@ChristopherDavenport

LGTM 👍

@rossabaker rossabaker merged commit 820e0fe into http4s:master Dec 22, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jodagm jodagm deleted the jodagm:websocket branch Dec 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment