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

Needs updating to include .NET Core 2.1 HttpClientFactory #7489

Closed
rcollette opened this issue Sep 4, 2018 — with docs.microsoft.com · 9 comments
Closed

Needs updating to include .NET Core 2.1 HttpClientFactory #7489

rcollette opened this issue Sep 4, 2018 — with docs.microsoft.com · 9 comments
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-csharp/svc fundamentals/subsvc Pri2
Milestone

Comments

Copy link

rcollette commented Sep 4, 2018

Additionally, I have not seen much documentation that includes the method encapsulated HttpClient configuration pattern whose DI setup looks like.
'''
services.AddHttpClient<IMyService, MyServiceImplementation>( configuration => ...)
'''


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@BillWagner BillWagner added the P1 label Sep 13, 2018
@BillWagner BillWagner added this to the Backlog milestone Sep 13, 2018
@BillWagner
Copy link
Member

Thanks for raising this issue @rcollette

I've added this to our backlog for the next update to this sample.

Copy link

Any news on this Bill?

Copy link

wadebee commented Apr 18, 2019

For those of us behind corporate firewalls it would be helpful to include a discussion about proxy handling including examples of setting up the WebProxy and HttpClientHandler classes needed.

@BillWagner BillWagner added 🗃️ Technology - C# Fundamentals doc-enhancement Improve the current content [org][type][category] labels Oct 9, 2019
@BillWagner BillWagner removed the triaged label Oct 9, 2019
Copy link

For anybody who has trouble with proxy: This worked for me: Replace:
private static readonly HttpClient client = new HttpClient();
with
private static readonly HttpClientHandler handler = new HttpClientHandler
{
DefaultProxyCredentials = System.Net.CredentialCache.DefaultNetworkCredentials
};
private static readonly HttpClient client = new HttpClient(handler);

@PRMerger8 PRMerger8 added the Pri2 label Jan 16, 2021
@dotnet-bot dotnet-bot added the won't fix Issues that were closed as part of automated backlog grooming label Jan 25, 2021
@dotnet-bot

This comment has been minimized.

@rcollette
Copy link
Author

@dotnet/docs - This issue was not addressed and I still believe it is an important feature to document.

@scottaddie
Copy link
Member

scottaddie commented Jan 25, 2021

@rcollette Have you already read the following doc?

https://docs.microsoft.com/aspnet/core/fundamentals/http-requests

The doc contains some examples of calls to AddHttpClient. We can expand upon the examples in this doc, if needed.

@rcollette
Copy link
Author

Yeah that suffices @scottaddie. Thank you for responding.

@BillWagner
Copy link
Member

Thanks @scottaddie.

@rcollette We'll leave this closed, as addressed.

@sharwell sharwell added doc-provided and removed won't fix Issues that were closed as part of automated backlog grooming labels Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-enhancement Improve the current content [org][type][category] dotnet-csharp/svc fundamentals/subsvc Pri2
Projects
None yet
Development

No branches or pull requests