.NET (Page 2)

Migrating and open-sourcing my blog

What changed on my blog - Statiq, GitHub, giscus, and much more.

Today I talk to you about the recent changes I made to my blog when I migrated it to Statiq and open-sourced it.

Read more...

Handle token retrieval while querying an API

Using a DelegatingHandler

In our daily job, we often have to query secure REST APIs that require our HTTP requests to have a valid access token in their Authorization header. Of course, many APIs come with an SDK that makes the job easier for us as it directly takes care of retrieving a token and sending the authenticated HTTP requests. However, it is not always the case and knowing how to implement that using HttpClient, IMemoryCache, and DelegatingHandler can become pretty useful.

Read more...