Skip to content

[Java] Allow configuration of OkHttpClient.Builder #23822

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

Merged
merged 7 commits into from
Jul 20, 2020

Conversation

BrennanConroy
Copy link
Member

@BrennanConroy BrennanConroy commented Jul 9, 2020

Fixes #15404

No functional tests in java currently. Manually tested out setting a cert pinner and read timeout on the builder, looks good.

New method on the HttpHubConnectionBuilder class.
HttpHubConnectionBuilder setHttpClientBuilderCallback(Action1<OkHttpClient.Builder> configureBuilder)

@BrennanConroy BrennanConroy added the area-signalr Includes: SignalR clients and servers label Jul 9, 2020
@BrennanConroy BrennanConroy added this to the 5.0.0-preview8 milestone Jul 9, 2020
@BrennanConroy
Copy link
Member Author

Any other feedback here?

@@ -36,7 +36,7 @@ public void close() {
}
}

public DefaultHttpClient(int timeoutInMilliseconds, OkHttpClient client) {
public DefaultHttpClient(int timeoutInMilliseconds, OkHttpClient client, Action1<OkHttpClient.Builder> configureBuilder) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove the timeoutInMilliseconds parameter then? I don't see anywhere it's passed in with a null client, and with a non-null client it doesn't do anything.

@BrennanConroy BrennanConroy changed the base branch from master to release/5.0-preview8 July 20, 2020 19:32
@BrennanConroy
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@BrennanConroy BrennanConroy added the tell-mode Indicates a PR which is being merged during tell-mode label Jul 20, 2020
@BrennanConroy
Copy link
Member Author

@dotnet/aspnet-build could I get a merge please? I already talked to Kevin

@dougbu dougbu merged commit c18571c into release/5.0-preview8 Jul 20, 2020
@dougbu dougbu deleted the brecon/httpbuilder branch July 20, 2020 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-signalr Includes: SignalR clients and servers tell-mode Indicates a PR which is being merged during tell-mode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support certificate pinning for java SignalR client
5 participants