logoalt Hacker News

ga_totoday at 7:41 AM1 replyview on HN

Nice ad you got there. How do I define request interceptors with fetch? Axios does it.


Replies

eranationtoday at 8:13 AM

You can add your own wrapper but if you're building a whole auth/retry/logging layer, axios is probably better for that. For most other use cases a small wrapper will do the job.

Didn't mean it as an ad btw, the supply chain risk is real though. Axios could be the best HTTP library ever written and it still would've dropped a RAT on your laptop on March 31 without min-release-age set.