Top "Dotnet-httpclient" questions

Refers to the System.

HttpClient: How to upload multiple files at once

I am trying to upload muliple files using System.Net.Http.HttpClient. using (var content = new MultipartFormDataContent()) { content.Add(new …

c# file-upload .net-4.5 dotnet-httpclient
Re-Send HttpRequestMessage - Exception

I want to send the exact same request more than once, for example: HttpClient client = new HttpClient(); HttpRequestMessage req = new …

c# .net dotnet-httpclient
HttpClient.PostAsJsonAsync never sees when the post is succeeding and responding

We are using an HttpClient to post json to a restful web service. In one instance, we are running into …

c# async-await dotnet-httpclient connection-timeout
Best way to use HTTPClient in ASP.Net Core as a DI Singleton

I am trying to figure out how to best use the HttpClient class in ASP.Net Core. According to the …

c# asp.net-core dotnet-httpclient
HttpClient single instance with different authentication headers

Given that the .net HttpClient has been designed with reuse in mind and is intended to be long lived and …

c# .net oauth authorization dotnet-httpclient
Simulate Postman Post in C# - RestSharp

I am doing tests on a browser game. This post request is suppose to issue a command to build a …

c# http-post postman restsharp dotnet-httpclient
How to add multiple HttpMessageHandler to HttpClient without HttpClientFactory

I have a console application that uses HttpClient to make web requests. var client = new HttpClient(); I'm trying to add …

c# .net dotnet-httpclient
Wrong Content-Type header generated using MultipartFormDataContent

I have the following code: private static string boundary = "----CustomBoundary" + DateTime.Now.Ticks.ToString("x"); private static async Task<…

c# .net-4.5 content-type multipartform-data dotnet-httpclient