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

Configure IdentityModel request message & configure all http clients. #4353

Merged
merged 1 commit into from
Jun 15, 2020

Conversation

maliming
Copy link
Member

@maliming maliming commented Jun 15, 2020

Related #4062

This allow configure all the dynamic http client and configure the request message of the IdentityModel extension method. It can make httpclient support http 2.

example:

Configure<AbpHttpClientOptions>(options =>
{
	options.HttpClientActions.Add(clientName =>
	{
		if (clientName == "MyClient")
		{
			return c => c.DefaultRequestVersion = HttpVersion.Version10;
		}

		return c => c.DefaultRequestVersion = HttpVersion.Version20;
	});
}

Configure<IdentityModelHttpRequestMessageOptions>(options =>
{
	options.ConfigureHttpRequestMessage = request => request.Version = HttpVersion.Version20;
});

@hikalkan hikalkan merged commit 772e4ed into dev Jun 15, 2020
@hikalkan hikalkan added this to the 3.0 milestone Jun 15, 2020
@hikalkan hikalkan deleted the maliming/http2 branch June 15, 2020 19:12
@hikalkan
Copy link
Member

Thanks for the solution.

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

Successfully merging this pull request may close these issues.

None yet

2 participants