Top "Dotnet-httpclient" questions

Refers to the System.

Post byte array to Web API server using HttpClient

I want to post this data to Web API server: public sealed class SomePostRequest { public int Id { get; set; } public …

c# asp.net-web-api asp.net-web-api2 dotnet-httpclient
How do I get StatusCode from HttpRequestException?

I'm probably missing something obvious here. I'm using HttpClient which throws HttpRequestException that contains StatusCode in the Message string. How …

c# dotnet-httpclient httpexception
ASP.NET WebApi: how to perform a multipart post with file upload using WebApi HttpClient

I have a WebApi service handling an upload from a simple form, like this one: <form action="/api/workitems" …

c# asp.net asp.net-web-api dotnet-httpclient
Async call with await in HttpClient never returns

I have a call I am making from inside a xaml-based, C# metro application on the Win8 CP; this call …

c# asynchronous async-await dotnet-httpclient
HttpClient authentication header not getting sent

I'm trying to use an HttpClient for a third-party service that requires basic HTTP authentication. I am using the AuthenticationHeaderValue. …

c# .net-4.5 wcf-web-api dotnet-httpclient
How to use HttpClient to send content in body of GET request?

Currently to send a parameterized GET request to an API interface I am writing the following code: api/master/city/…

c# get request dotnet-httpclient
PATCH Async requests with Windows.Web.Http.HttpClient class

I need to do a PATCH request with the Windows.Web.Http.HttpClient class and there is no official documentation …

c# http patch dotnet-httpclient
Trying to run multiple HTTP requests in parallel, but being limited by Windows (registry)

I'm developing an application (winforms C# .NET 4.0) where I access a lookup functionality from a 3rd party through a simple …

c# multithreading dotnet-httpclient
HttpClient vs HttpWebRequest

I have a large file which I have to send to a web api client...The data is multi part. …

c#-4.0 asp.net-web-api dotnet-httpclient
Adding HttpClient headers generates a FormatException with some values

This occurred within the context of coding against Google Cloud Messaging, but applies elsewhere. Consider the following: var http = new …

c# dotnet-httpclient google-cloud-messaging