Questions tagged [httpclient]
The httpclient tag has no summary.
7 questions
5
votes
2
answers
239
views
Laravel as client for Strava 3rd party API
I’m developing a Laravel app which acts as a client to consume a 3rd party Strava API. My app also functions as an API for a frontend SPA. The user (which is just me for the time being) will already ...
2
votes
2
answers
262
views
How can I design the configuration of the library with Typed HttpClients in DI better?
I have written a .Net Client wrapper for Google Gemini (Generative AI) REST API and published it as a Nuget package. I am seeking a review of the code.
I have spent quite some time in designing how it ...
2
votes
1
answer
943
views
Replacement for EnsureSuccessStatusCode
I like the simplicity of EnsureSuccessStatusCode for HttpResponseMessage after a call using ...
2
votes
2
answers
928
views
Exponential retry handler implementing DelegatingHandler in C#
I am writing a small library where I don't want to include Polly since I want to keep the number of dependencies as small as possible. I also thought it was a good learning exercise to do this on my ...
5
votes
1
answer
175
views
C# console app to subscribe to Chuck Norris API
I'm a newbie when it comes to programming. I'm working on a console app that subscribes to ChuckNorris JSON API and displays the results.
I believe I took into account all possible scenarios. Do you ...
4
votes
1
answer
3k
views
Use a static field for cache an authentication token in .NET API
I have a .NET 6 web API that does some requests to another third party API, this API has a token that expires after a few hours, so I want to cache this token and reuse in the requests.
Here how I ...
2
votes
1
answer
5k
views
HttpClient retry handler on response 429
When the remote server returns a 429 (Too Many Requests) response with the Retry-After header, the HttpClient can handle such cases with a handler:
...