axios: Promise-based HTTP client for browsers and Node.js
Promise-based HTTP client with unified browser and Node.js interface.
Learn more about Axios
axios is an HTTP client library for JavaScript that abstracts XMLHttpRequest in browsers and the http/https modules in Node.js behind a common interface. It uses native JavaScript promises to handle asynchronous operations, allowing developers to chain requests and handle responses with .then() and .catch() methods. The library supports request and response interceptors, request cancellation, automatic JSON transformation, and timeout configuration. It is commonly used in single-page applications, Node.js servers, and other JavaScript environments requiring HTTP communication.
Universal JavaScript API
Single interface works across browser and Node.js environments without code changes. Eliminates the need for separate HTTP client implementations when sharing code between frontend and backend.
Request/Response Interceptors
Middleware-like hooks intercept HTTP operations before completion. Enables centralized authentication token injection, error handling, and response transformation without repeating logic across requests.
Request Cancellation Support
Cancel in-flight requests using AbortController or cancellation tokens. Prevents memory leaks in single-page applications and handles user navigation away from pending operations.
import axios from 'axios';
const response = await axios.get('https://api.example.com/users');
const users = response.data;
console.log(users);Critical security fix for Denial of Service vulnerability in mergeConfig and restoration of missing status field in AxiosError.
- –Security: Fixed a potential Denial of Service issue involving the proto key in mergeConfig
- –Bug fix: Resolved an issue where AxiosError could be missing the status field on and after v1.13.3
- –Ensure status is present in AxiosError on and after v1.13.3
Bug fixes addressing issues discovered in v1.13.3 with significant CI/CD workflow improvements.
- –fix: issues with version 1.13.3
- –Fixed issues discovered in v1.13.3 release
- –Cleaned up interceptor test files
- –Improved workflow configurations
HTTP2 improvements, interceptor fixes, and enhanced package compatibility with TypeScript and Bun support.
- –http2: Use port 443 for HTTPS connections by default
- –interceptor: handle the error in the same interceptor
- –main field in package.json should correspond to cjs artifacts
- –package.json: add 'bun' package.json 'exports' condition. Load the Node.js build in Bun instead of the browser build
- –silentJSONParsing=false should throw on invalid JSON
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
Spring Initializr
Extensible API for generating JVM projects with multi-language and build system support.
Go
Statically typed, compiled language by Google focused on simplicity, concurrency, and fast compilation.
Colima
Lima-based container runtime provisioning for macOS and Linux.
tqdm
Instrument Python iterables with minimal-overhead progress tracking.
Create React App
Zero-configuration React scaffolding tool with preconfigured toolchain.