Top "Httpclientfactory" questions

Refers to the System.

How to mock the new HttpClientFactory in .NET Core 2.1 using Moq

.NET Core 2.1 comes with this new factory called HttpClientFactory, but I can't figure out how to mock it to unit …

c# unit-testing moq asp.net-core-2.1 httpclientfactory
Can I use HttpClientFactory in a .NET.core app which is not ASP.NET Core?

I have read the popular blog post https://www.stevejgordon.co.uk/introduction-to-httpclientfactory-aspnetcore on using HttpClientFactory To quote from it …

c# asp.net-core .net-core httpclientfactory
How to use HttpClientHandler with HttpClientFactory in .NET Core

I want to use the HttpClientFactory that is available in .NET Core 2.1 but I also want to use the HttpClientHandler …

c# .net-core dotnet-httpclient .net-core-2.1 httpclientfactory
How to configure web proxy for HttpClient created directly via HttpClientFactory?

By directly I mean without Asp.Net Core IoC/DI helpers. I didn't find docs about it and I think …

c# .net .net-core dotnet-httpclient httpclientfactory
HttpClientFactory TaskCanceledException: Unable to read data from the transport connection

I have created a simple console app that downloads a single (PDF) file from archive.org using the new ASP.…

c# asp.net-core asp.net-core-2.1 httpclientfactory
Authentication per request using HttpClientFactory .net Core 2.1

How should I use HttpClientFactory to return an instance of HttpClient whose uri and credentials are determined at the point …

c# .net-core httpclientfactory
Configure HttpClientFactory to use data from the current request context

With the new HttpClientFactory in ASP.NET Core 2.1, it's quite easy to configure custom HTTP clients with things like base …

c# asp.net-core-2.1 httpclientfactory
Passing IHttpClientFactory to .NET Standard class library

There's a really cool IHttpClientFactory feature in the new ASP.NET Core 2.1 https://www.hanselman.com/blog/HttpClientFactoryForTypedHttpClientInstancesInASPNETCore21.aspx I'm …

c# asp.net-core .net-standard-2.0 httpclientfactory
How to Refresh a token using IHttpClientFactory

I am using IHttpClientFactory for sending requests and receiving HTTP responses from two external APIs using Net Core 2.2. I am …

c# asp.net-core appsettings httpclientfactory
How to use ConfigurePrimaryHttpMessageHandler generic

I want to add an HttClientHandler for a Typed HttpClient in order to include certificate authentication. All the examples I'm …

c# .net-core dotnet-httpclient .net-core-2.1 httpclientfactory