About 21,700 results
Open links in new tab
  1. c# - Best Practice for Use HttpClient - Stack Overflow

    May 11, 2016 · What about creating HttpRequestMessage for each request? And then use the SendAsync method of HttpClient. That way you can specify different credentials between requests, …

  2. c# - Make Https call using HttpClient - Stack Overflow

    Mar 7, 2014 · I have been using HttpClient for making WebApi calls using C#. Seems neat & fast way compared to WebClient. However I am stuck up while making Https calls. How can I make …

  3. c# - Adding Http Headers to HttpClient - Stack Overflow

    Aug 19, 2012 · I need to add http headers to the HttpClient before I send a request to a web service. How do I do that for an individual request (as opposed to on the HttpClient to all future requests)? I'm …

  4. c# - Dynamically changing HttpClient.Timeout in .NET - Stack Overflow

    The way this works is, your singleton HttpClient will have an infinite timeout, but it'll use a custom HttpClientHandler that will hijack the default SendAsync behavior of your HttpClient to honor any …

  5. c# - What is the overhead of creating a new HttpClient per call in a ...

    HttpClient is intended to be instantiated once and re-used throughout the life of an application. Especially in server applications, creating a new HttpClient instance for every request will exhaust …

  6. c# - How to post data using HttpClient? - Stack Overflow

    var response = await httpClient.GetAsync(url); var data = await response.Content.ReadAsStringAsync(); But the problem is that I don't know how to post data? I have to send a post request and send these …

  7. c# - How do you use Basic Authentication with System.Net.Http ...

    Sep 19, 2019 · How do you use Basic Authentication with System.Net.Http.HttpClient? Asked 6 years, 3 months ago Modified 9 months ago Viewed 216k times

  8. c# - How to POST using HTTPclient content type = application/x-www …

    I am currently developing a wp8.1 application C#, i have managed to perform a POST method in json to my api by creating a json object (bm) from textbox.texts. here is my code below. How do i take the

  9. c# - Custom header to HttpClient request - Stack Overflow

    Mar 10, 2016 · How do I add a custom header to a HttpClient request? I am using PostAsJsonAsync method to post the JSON. The custom header that I would need to be added is "X-Version: 1" This is …

  10. c# - How do I set up HttpContent for my HttpClient PostAsync second ...

    How do I set up HttpContent for my HttpClient PostAsync second parameter? Asked 12 years, 3 months ago Modified 1 year, 7 months ago Viewed 666k times