Skip to content

Needs updating to include .NET Core 2.1 HttpClientFactory #7489

Closed

Description

@rcollette

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.

Activity

  1. added this to the Backlog milestone on Sep 13, 2018
  2. BillWagner commented on Sep 13, 2018

    @BillWagner
    Member

    Thanks for raising this issue @rcollette

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

  3. garfbradaz commented on Oct 17, 2018

    @garfbradaz

    Any news on this Bill?

  4. wadebee commented on Apr 18, 2019

    @wadebee

    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.

  5. cornel001 commented on Feb 10, 2020

    @cornel001

    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);

  6. added
    won't fixIssues that were closed as part of automated backlog grooming
    on Jan 25, 2021
  7. dotnet-bot commented on Jan 25, 2021

    @dotnet-bot
  8. rcollette commented on Jan 25, 2021

    @rcollette
    Author

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

  9. scottaddie commented on Jan 25, 2021

    @scottaddie
    Member

    @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.

  10. rcollette commented on Jan 25, 2021

    @rcollette
    Author

    Yeah that suffices @scottaddie. Thank you for responding.

  11. BillWagner commented on Jan 25, 2021

    @BillWagner
    Member

    Thanks @scottaddie.

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

  12. added and removed
    won't fixIssues that were closed as part of automated backlog grooming
    on Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions