Top "Dotnet-httpclient" questions

Refers to the System.

Add client certificate to .net core Httpclient

I was playing around with .Net Core and building an API that utilizes payment APIs. There's a client certificate that …

c# .net asp.net-core .net-core dotnet-httpclient
Make http client synchronous: wait for response

I have some file to upload and some of the files failed because the post is asynchronous and not synchronous.. …

c# httpresponse dotnet-httpclient
Retrying HttpClient Unsuccessful Requests

I am building a function that given an HttpContent Object, will issues request and retry on failure. However I get …

c# dotnet-httpclient httpcontent
Adding authorization to the headers

I have the following code: ... AuthenticationHeaderValue authHeaders = new AuthenticationHeaderValue("OAuth2", Contract.AccessToken); string result = await PostRequest.AuthenticatedGetData(fullUrl, null, authHeaders); …

c# windows-phone-8 async-await dotnet-httpclient
Struggling trying to get cookie out of response with HttpClient in .net 4.5

I've got the following code that works successfully. I can't figure out how to get the cookie out of the …

c# async-await dotnet-httpclient
Is HttpClient safe to use concurrently?

In all the examples I can find of usages of HttpClient, it is used for one off calls. But what …

.net c#-4.0 concurrency dotnet-httpclient
C# HttpClient.SendAsync throw "An error occurred while sending the request" exception when testing some URLs

I am developing an C# console application for testing whether a URL is valid or works. It works well for …

c# .net http dotnet-httpclient
Strange issue with System.Net.Http 4.2.0.0 not found

I have a strange issue, which drives me crazy… I have a simple Class Library Project (Full .NET Framework, 4.6.1) with …

.net visual-studio-2017 dotnet-httpclient service-fabric-stateless
What is the overhead of creating a new HttpClient per call in a WebAPI client?

What should be the HttpClient lifetime of a WebAPI client? Is it better to have one instance of the HttpClient …

c# asp.net web-services asp.net-web-api dotnet-httpclient
HttpClient Multipart Form Post in C#

I'm trying to do a multipart form post using the HttpClient in C# and am finding the following code does …

c# dotnet-httpclient