DEV Community

Jason Cruz
Jason Cruz

Posted on

Axios Scripts

Axios Scripts Made Easy

When I was attending bootcamp a year or so ago, some of my bootcamp friends and I discovered the way to add a script to an npm package better known as Axios.

Axios is a Javascript library used to make HTTP requests from node. js or XMLHttpRequests from the browser and it supports the Promise API that is native to JS ES6. It can be used intercept HTTP requests and responses and enables client-side protection against XSRF. It also has the ability to cancel requests. (Thanks Google)

If you are like me, I look for better ways to code. And at the time, I was struggling with coding and understanding Axios. When I did however, I made something for me to use from then to the end of time. And last I checked, it was still there for me to use. I used it today! I thought i'd share it with you. Because I want to see you the follow succeed in coding.

I made 2 scripts for Axios. Inorder to access them, you MUST install the package via npm i axios first. Once you have, create a seperate axios file and in the area where your about to code, type: axx or aax

And you will get one of these functions:
aax

axios functional component

I hope this help you. Follow me for some more tips and tricks! Share the post with ppl you think may need it as well..


Top comments (0)