DEV Community

Discussion on: Axios or Fetch?- in 2 minutes

Collapse
 
sgoulas profile image
sgoulas • Edited

This post seems to miss the biggest differences. Axios automatically converts fetched data to a JSON where fetch requires the dev to do it. Also axios implements cancelable requests by exposing a cancel function where with fetch the dev has to override the API to cancel the request.

Also, with axios you get easy time out configuration and http interceptors on requests and responses.

Collapse
 
brogrammerben profile image
Ben

The interceptors are my major selling point.

Collapse
 
fasani profile image
Michael Fasani

Yea +1 for the interceptors!