How To Log Outgoing HTTP Requests with Spring Boot 3
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