Skip to content

Make IHttpClientFactory available for CORECLR? #1115

@martincostello

Description

@martincostello

The commit d518dd1 was brought to my attention by @AnthonySteele for supporting the use of Microsoft's new IHttpClientFactory in .NET Core 2.1 for use with the AWS SDK.

However after looking into it, it's only available to the portable-net45+win8+wpa81+wp8 TFM, and not the netstandard1.3 TFM.

Is there a specific reason for it not being enabled for .NET Core? If not, are you open for me opening a PR to enable it for CORECLR in the source code?

Expected Behavior

The ability to use IClientConfig.HttpClientFactory for .NET Standard-targeting applications.

Current Behavior

The HttpClientFactory property is not available on the IClientConfig interface with the netstandard1.3 TFM assembly.

Possible Solution

Add HttpClientFactory to IClientConfig for the CORECLR define constant. For example this line of code could be changed to:

#if PCL || CORECLR

Context

We'd like to be able to plug IHttpClientFactory into the AWS SDK easily to leverage changes Microsoft have made their, like connection pooling etc. While it is possible to integrate IHttpClientFactory into the AWS SDK today, it is non-trivial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions