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

Support headers and query strings in HTTP::WebSocket #4222

Closed
adamtrilling opened this issue Apr 1, 2017 · 1 comment
Closed

Support headers and query strings in HTTP::WebSocket #4222

adamtrilling opened this issue Apr 1, 2017 · 1 comment

Comments

@adamtrilling
Copy link
Contributor

adamtrilling commented Apr 1, 2017

HTTP::WebSocket doesn't support query strings or headers. I need it to do so for a project that I'd like to use Crystal for, so I'd like to take a crack at making it work. For query strings, the solution in #3234 should work. For headers, I'm envisioning adding a headers parameter to HTTP::WebSocket.new(), like:

def self.new(uri : URI | String, headers : HTTP::Headers? = nil)

and

def self.new(host : String, path : String, port = nil, tls = false, headers : HTTP::Headers? = nil)

Then I will handle the parameter in the constructors for HTTP::WebSocket::Protocol. What do y'all think?

@sdogruyol
Copy link
Member

Now that we have #4227 merged, can we close this?

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

No branches or pull requests

3 participants