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 support for user added headers, like authentication tokens. #2374

Closed
wants to merge 2 commits into from
Closed

Add support for user added headers, like authentication tokens. #2374

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Sep 29, 2019

The user can now create a websocket client with custom added req.headers.

Copy link
Contributor

@Geod24 Geod24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change: You can't add a parameter in the middle like this.
Also it only affects one of the two connectWebSocket overloads.

@ghost
Copy link
Author

ghost commented Sep 30, 2019

It should not break, I did tests locally. I guess it has to do with the spaces..

This is a breaking change: You can't add a parameter in the middle like this.

Why not?

Also it only affects one of the two connectWebSocket overloads.

Isn't that what overloads are for?

@Geod24
Copy link
Contributor

Geod24 commented Sep 30, 2019

Why not?

Because your tests did not include a custom HTTPClientSettings. If someone calls it with connectWebSocket(myURL, myHTTPClientSettings), it will break.

Isn't that what overloads are for?

The overload I mentioned does not call this overload. They should probably be unified though, as it looks like code duplication.

@ghost ghost closed this Sep 30, 2019
s-ludwig added a commit that referenced this pull request Nov 23, 2019
@s-ludwig s-ludwig mentioned this pull request Nov 23, 2019
This pull request was closed.
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.

2 participants