Skip to main content
-4 votes
0 answers
103 views

I suppose, the following example of HttpClient usage with error handling is pretty basic: public class TaskHTTP_ClientClient { private readonly HttpClient httpClient = new HttpClient(); private ...
Takeshi Tokugawa YD's user avatar
0 votes
0 answers
87 views

I have to upload a file to an embedded device running an API. First, I tried to write methods to do this in a test project. This works great: private static async Task<HttpResponseMessage?> ...
Oliver Bleen's user avatar
0 votes
1 answer
72 views

I try to move a request with certificate from an old system made with NodeJS to a new system using .NET 8.0. Running the .NET code, however, I always get the following error: The SSL connection could ...
Chanom First's user avatar
  • 1,156
Best practices
0 votes
3 replies
67 views

Our application is somewhat of a middleman that transforms data from numerous APIs. Initially to simplify things, we wrote a bunch of specific clients which wrap an instance of HttpClient created in ...
MetallicHydrogen's user avatar
Best practices
2 votes
4 replies
88 views

I am using HttpClient in .NET 9 to get content that has a JSON part along with a base-64 encoded file. Reading the content as a string, I don't see a clear format that would ensure consistent parsing ...
NeartCarp's user avatar
  • 231
0 votes
1 answer
194 views

In Windows 7 32-bit, on .NET 4.6.1, this code works fine and the remote server is returning data: using (HttpClient client = new HttpClient()) { client.Timeout = TimeSpan.FromSeconds(3); ...
panci matika's user avatar
3 votes
2 answers
218 views

We use the following function to test internet connectivity every 5 seconds. But in some part of the world, this function always returns false. Now, the problem is we can set a proxy server in Windows ...
Ming's user avatar
  • 615
1 vote
0 answers
66 views

I'm working on a .NET MAUI Android app that sends order data to a Web API using HttpClient. On normal Wi-Fi connections everything works fine, but when I throttle the network speed to around 56 kbps (...
Lasitha Lankajeewa's user avatar
1 vote
0 answers
65 views

I'm working on a console application to automatically interact with an API that needs and OAuth authorized user with a specific set of claims. If I use a browser to log in with a username and password ...
user31727878's user avatar
6 votes
3 answers
175 views

I have an HttpClient built with IHttpClientFactory and Microsoft.Extensions.Http.Resilience retry on 401. Pipeline: Primary: HttpClientHandler (AllowAutoRedirect = false) Delegating: ....
Artyom Avetisyan's user avatar
2 votes
1 answer
136 views

I'm trying to download a webpage from a specific website (Bandcamp). I'm getting different results although the request seems the same: On Windows 10, using a HttpClient in C#: I'm getting "...
Otiel's user avatar
  • 18.8k
1 vote
1 answer
110 views

I have a .NET Core project with two layers: an API layer and a UI layer, both in the same solution. The UI layer is built with ASP.NET Core MVC, where controllers call services, and the services use ...
za mk's user avatar
  • 11
4 votes
1 answer
178 views

My HttpListener for some reason can't listen to prefix http://127.0.0.100:50001/, getting an error Unhandled exception. System.Net.HttpListenerException (32): The process cannot access the file ...
Roman Kovalov's user avatar
1 vote
0 answers
53 views

The http spec allows multiple responses per http request: A single request can have multiple associated responses: zero or more "interim" (non-final) responses with status codes in the &...
Volker's user avatar
  • 1,849
1 vote
1 answer
102 views

I have an API service class that implements HttpClient to connect to my API, I have a user list model, and I have a View Model using the Community Toolkit MVVM approach. I would like to understand how ...
Артур Дементьев's user avatar

15 30 50 per page
1
2 3 4 5
211