How To Log Outgoing HTTP Requests with Spring Boot 3

Posted on Oct 2, 2023 in
Reading time: 1 minute

Intro

When communicating with external APIs, we often use a RestTemplate, WebClient, or RestClient. All of these can be instrumented to log the requests they are sending so we can look into them and ensure they look how we expect them to.

This tutorial shows you how to write a custom interceptor to inspect HTTP requests performed with the new RestClient.

🍿 Get the code from GitHub

The Dead Letter Queue

Love what you're seeing? By subscribing to my newsletter, not only will you be the first to know about fresh tutorials and videos, but you'll also unlock:

Subscribe now and become a part of our growing tech tribe!