DEV Community

Anuj Pancholi
Anuj Pancholi

Posted on

Logging Axios Request and Response Headers

Here's what I usually do:

In the request interceptor, I use some UUID library (or maybe the crypto core module of node) to generate a UUID, then attach it to the config object as a request ID, say config.reqId. Same config object should be accessible in response.config, orโ€ฆ

Top comments (0)