Why Axios for API integration

 

Image for post

When i started using react, i was wondering, how to connect to Rest API from UI. I started searching library which can be used to fulfill this purpose.

Then, i turn towards fetch api and axios api. I started studying about both the libraries before actually using it.

Then, i decided to use the axios library, and try to compare both the libraries.

Below are the some features, which makes axios more powerful :

  1. Making simultaneous requests using axios.all

2. Sending custom headers

3. Automatically transforming requests and responses in json data

4. Cancelling request

5. Axios Is More Secure, Featuring Built In Cross Site Forgery (XSRF) Protection

6. Monitor POST Request Progress

7. Axios Has A Wider Range Of Supported Browsers

8.Better error handling

Browsers Support :




Stay tuned for more updates !!!!

Happy reading :)

Comments

Popular posts from this blog

Difference between npm and npx