One of the most common tasks for backend developers is integrating with third party APIs. And most of the time we end up solving the same problems over and over again, like automatically refreshing the auth token, which eventually expires. Let’s consider the following scenario. There is a third party API at https://denispavlov.net, which requires […]
Continue ReadingMulti Value Dictionary
I recently was asked to implement a dictionary-like data structure that can store multiple values for a given key. The interface I was given is as follows. Since the precondition was that the values are unique for any given key, I decided to use a Dictionary where key is of type K and value is […]
Continue ReadingProduction Quality HttpClient
In this post I would like to discuss some of the good and bad ways to use the HttpClient. I am going to start from the basics. What is the problem with the following code? Problem is that the HttpClient is not being properly disposed, as it implements IDisposable interface. So, let’s do it. Right? […]
Continue Reading