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

Set up HttpClient for ClientWebSocket.ConnectAsync #73387

Merged

Conversation

greenEkatherine
Copy link
Contributor

@greenEkatherine greenEkatherine commented Aug 4, 2022

Fixes #72476

Detecting if we get HttpClient as a parameter in ConnectAsync -- in that case another SendAsync method should be called to provide correct options.

Most part of PR is adding HttpClient/HttpMessageInvoker into all existing tests.

@ghost
Copy link

ghost commented Aug 4, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #72301

Detecting if we get HttpClient as a parameter in ConnectAsync -- in that case another SendAsync method should be called to provide correct options.

Most part of PR is adding HttpClient/HttpMessageInvoker into all existing tests.

Author: greenEkatherine
Assignees: -
Labels:

area-System.Net.Http

Milestone: -

@ghost
Copy link

ghost commented Aug 4, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #72301

Detecting if we get HttpClient as a parameter in ConnectAsync -- in that case another SendAsync method should be called to provide correct options.

Most part of PR is adding HttpClient/HttpMessageInvoker into all existing tests.

Author: greenEkatherine
Assignees: greenEkatherine
Labels:

area-System.Net

Milestone: -

…ockets/WebSocketHandle.Managed.cs

Co-authored-by: Miha Zupan <[email protected]>
@greenEkatherine
Copy link
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@greenEkatherine
Copy link
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@MihaZupan MihaZupan left a comment

Choose a reason for hiding this comment

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

There's a lot of duplication of ConnectAsync and GetConnectedWebSocket in tests.

Can they be implemented as helper methods on ClientWebSocketTestBase instead, with the only thing for tests to implement being

protected virtual HttpMessageInvoker? GetInvoker();

?

@greenEkatherine
Copy link
Contributor Author

/azp run runtime-libraries-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@greenEkatherine
Copy link
Contributor Author

Failures in the outerloop builds are unrelated

@greenEkatherine greenEkatherine merged commit 2cb6c19 into dotnet:main Aug 9, 2022
@greenEkatherine greenEkatherine deleted the http-client-for-clientwebsocket branch August 9, 2022 11:21
@ghost ghost locked as resolved and limited conversation to collaborators Sep 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebSockets over HTTP/1.1 with HttpClient fails
5 participants