rest

Discussion about API clients

What should you consider when choosing an API client?

This article is a discussion about API clients. Without being a comparison between the best API clients, this article talks about the pros and cons of some popular tools to send HTTP requests to an API. The goal is not to elect the best one, but rather to try to answer the following question: what we should consider when choosing an API client, and what are the challenges when using one?

Read more...

Once upon a time in .NET

A story about records, HTTP message handlers, HTTP client extensions...

In this article, I want to talk about a few things in .NET such as HTTP requests with an Http Client, HTTP message handlers, records... For the theoretical aspect of these topics, I think the official documentation on docs.microsoft.com and many blog articles already explain them very well, better than I could ever do. But what I am interested in here is to talk about these topics through a case study.

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...

Testing your API with REST Client

Why using the vscode extension "REST Client" instead of Postman?

Let's talk about tooling and testing an API!

Read more...