Overview
Axios is a JavaScript library for making HTTP requests. The same code runs in the browser and in Node.js, which is the main reason it is so widely used: a web app's front end and its server can share one way of calling APIs. Requests return promises, so they fit naturally with async and await.
On top of plain requests it adds conveniences that otherwise have to be written by hand. Interceptors let you inspect or change every request, response or error in one place, for example to attach a login token. Request bodies are encoded automatically as JSON, multipart form data or URL-encoded forms, and JSON responses are parsed for you. There are timeouts, cancellation with AbortController, upload and download progress reporting, and client-side protection against XSRF. An optional adapter uses the browser's Fetch API while keeping the same interface.
Axios is released under the MIT licence and installed from npm with any of the usual package managers, or loaded from a CDN with a script tag. The documentation site has moved: the old address axios-http.com now redirects to axios.rest. The project is funded by sponsors, whose logos are shown on the documentation pages.
Categories
Features
- Works in browsers and in Node.js with the same API
- Promise-based requests
- Interceptors for requests, responses and errors
- Automatic JSON, multipart FormData and URL-encoded body encoding
- Automatic parsing of JSON responses
- Timeouts and cancellation with AbortController
- Upload and download progress tracking
- Optional Fetch adapter alongside the default XHR adapter
- Client-side XSRF protection
Privacy
See the official privacy policy. Axios is a code library that runs inside your own application; it has no accounts and sends requests only where your code tells it to.
Pros & Cons
Pros
- Free and MIT licensed
- One API for front-end and server code
- Interceptors make shared headers and error handling simple
- Installs with npm, pnpm, yarn, bun or Deno, or from a CDN
- TypeScript support is included
Cons
- An extra dependency when the built-in fetch function already covers simple needs
- JavaScript and TypeScript only
- The documentation site carries sponsor listings unrelated to development
Community Reviews (0)
No written reviews yet — be the first to rate this tool.
Similar Tools
-
Provides utility functions for common JavaScript programming tasks.
Open Source No Signup Web -
Simplifies DOM manipulation, event handling, and AJAX in JavaScript.
Open Source No Signup Web -
Provides pre-built responsive CSS components and layout tools.
Open Source No Signup Web -
Developer Libraries · Tailwind CSS
Styles web pages using utility classes instead of custom CSS.
Open Source No Signup Web