Skip to content

Add http client constructor #188

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 1 commit into from
Dec 16, 2022
Merged

Add http client constructor #188

merged 1 commit into from
Dec 16, 2022

Conversation

Pliner
Copy link
Member

@Pliner Pliner commented Dec 16, 2022

To allow to setup it in this way:

builder.Services.AddHttpClient<IManagementClient, ManagementClient>(
        httpClient =>
        {
            httpClient.Timeout = TimeSpan.FromSeconds(60);
            httpClient.BaseAddress = new Uri("http://localhost:15672");
            return new ManagementClient(httpClient, "guest", "guest");
        }
)

@Pliner Pliner merged commit 498e3fd into master Dec 16, 2022
@Pliner Pliner deleted the add-http-client-constructor branch December 16, 2022 23:06
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.

1 participant