Matt Burgess
Apr 22, 2021

--

I very much agree with the points made in this article. Something to add is that both APIs become more readable with async/await, or at least IMO.

Don’t underestimate the value of interceptors, they’re not some useless abstraction. For example, I built a system that included data from multiple sources, each of which handled datetimes differently. By writing an interceptor I was able to clean up these different formats, converting all data within my actual application to a standard JS Date. This let us drop a number of parsers and formatters, and eliminated a common bug.

Personally I use Axios in any application where HTTP requests are a major factor in the design.

--

--

Matt Burgess
Matt Burgess

Written by Matt Burgess

Senior Web Developer based in Bangkok, Thailand. Javascript, Web and Blockchain Developer.

No responses yet