Skip to content

DefaultAWSOptions : Cannot set a default HttpClientHandler since version 4. #3790

@LeVraiSylvain

Description

@LeVraiSylvain

Describe the bug

With SDK Version 3, we primarily used awsOptions.DefaultClientConfig.HttpClientFactory to configure the HttpClientHandler (Proxy + Certificate Revocation Check):

services.AddDefaultAWSOptions((serviceProvider) => { var configuration = serviceProvider.GetRequiredService<IConfiguration>(); AWSOptions awsOptions = configuration.GetAWSOptions("AWS"); // IHttpClientHandlerFactory and AwsHttpClientFactory come from our private framework IHttpClientHandlerFactory? httpClientHandlerFactory = serviceProvider.GetService<IHttpClientHandlerFactory>(); awsOptions.DefaultClientConfig.HttpClientFactory = new AwsHttpClientFactory(httpClientHandlerFactory); return awsOptions; }); 

With SDK version 4, the API has changed significantly, and DefaultClientConfig no longer inherits from ClientConfig.

It seems we've lost the ability to configure a default HttpClientHandler since version 4.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Expected Behavior: Being able to set a default HttpClientHandler.

Current Behavior

It seems we've lost the ability to configure a default HttpClientHandler since version 4.

Reproduction Steps

N/A

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

awssdk.extensions.netcore.setup 4.0.0.0

Targeted .NET Platform

.NET 9

Operating System and version

Windows and Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.documentationThis is a problem with documentation.needs-review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions