Top "Httpcontent" questions

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
Where is HttpContent.ReadAsAsync?

I see in tons of examples on the web using the new HttpClient object (as part of the new Web …

c# .net asp.net-web-api httpcontent
Read HttpContent in WebApi controller

How can I read the contents on the PUT request in MVC webApi controller action. [HttpPut] public HttpResponseMessage Put(int …

c# asp.net-mvc asp.net-web-api httpcontent
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
How to set large string inside HttpContent when using HttpClient?

So, I created a HttpClient and am posting data using HttpClient.PostAsync(). I set the HttpContent using HttpContent content = new …

c# .net asp.net-web-api httpclient httpcontent
Set Authorization Header of HttpClient

I have the following code, and I want to set the Authorization of the post request to be like this: …

c# authorization httpclient httpcontent
Post JSON HttpContent to ASP.NET Web API

I have an ASP.NET Web API hosted and can access http get requests just fine, I now need to …

c# asp.net-web-api httpclient httpcontent
Stream from response.Content.ReadAsStreamAsync() is not readable randomly

I am making a .Net Web API application in which the following code is making call to my different c# …

c# asp.net-web-api async-await httpcontent httpresponsemessage
HTTPError Exception Message not displaying when webapi is run on Server vs being run locally

I have a webapi that runs on an IIS7.5 server. It has 3 controllers, and all 3 can be used to access …

c# iis-7.5 httpcontent
HttpContent.ReadAsStringAsync causes request to hang (or other strange behaviours)

We are building a highly concurrent web application, and recently we have started using asynchronous programming extensively (using TPL and …

c# async-await c#-5.0 httpcontent