Top "Dotnet-httpclient" questions

Refers to the System.

How do I set up HttpContent for my HttpClient PostAsync second parameter?

public static async Task<string> GetData(string url, string data) { UriBuilder fullUri = new UriBuilder(url); if (!string.IsNullOrEmpty(…

c# dotnet-httpclient httpcontent
.NET HttpClient. How to POST string value?

How can I create using C# and HttpClient the following POST request: I need such a request for my WEB …

c# asp.net-web-api dotnet-httpclient
Make Https call using HttpClient

I have been using HttpClient for making WebApi calls using C#. Seems neat & fast way compared to WebClient. However …

c# asp.net-web-api dotnet-httpclient
HttpClient not supporting PostAsJsonAsync method C#

I am trying to call a web API from my web application. I am using .Net 4.5 and while writing the …

c# json asp.net-web-api dotnet-httpclient
Adding headers when using httpClient.GetAsync

I'm implementing an API made by other colleagues with Apiary.io, in a Windows Store app project. They show this …

c# windows-runtime windows-store-apps dotnet-httpclient apiary.io
How do I pass an object to HttpClient.PostAsync and serialize as a JSON body?

I'm using System.Net.Http, I found several examples on the web. I managed to create this code for make …

c# json dotnet-httpclient
C# HttpClient 4.5 multipart/form-data upload

Does anyone know how to use the HttpClient in .Net 4.5 with multipart/form-data upload? I couldn't find any examples on …

c# upload .net-4.5 multipartform-data dotnet-httpclient
Custom header to HttpClient request

How do I add a custom header to a HttpClient request? I am using PostAsJsonAsync method to post the JSON. …

c# asp.net http-headers dotnet-httpclient
How to get content body from a httpclient call?

I've been trying to figure out how to read the contents of a httpclient call, and I can't seem to …

c# dotnet-httpclient
HttpClient.GetAsync(...) never returns when using await/async

Edit: This question looks like it might be the same problem, but has no responses... Edit: In test case 5 the …

c# .net asynchronous async-await dotnet-httpclient