Navigate:
~$AXIOS0.0%

axios: Promise-based HTTP client for browsers and Node.js

Promise-based HTTP client with unified browser and Node.js interface.

LIVE RANKINGS • 08:08 AM • STEADY
OVERALL
#196
BACKEND & APIS
#8
30 DAY RANKING TREND
ovr#196
·Backe#8
STARS
108.5K
FORKS
11.5K
DOWNLOADS
63.6M
7D STARS
+21
7D FORKS
+5
See Repo:
Share:

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.


1

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.

2

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.

3

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);

vv1.13.2

Fixes socket hang-up crashes on keep-alive requests with timeouts and corrects http2 module export for test stubbing.

  • Upgrade to resolve 'socket hang up' errors when using keep-alive connections with configured timeouts.
  • Update if you stub http2 in tests; default export now used instead of named export for compatibility.
vv1.13.1

Fixes a regression where non-OK HTTP responses caused data streams to be interrupted unexpectedly.

  • Upgrade to restore correct streaming behavior for error responses (4xx/5xx status codes).
  • No breaking changes or new requirements; patch resolves data interruption introduced in prior release.
vv1.13.0

Adds HTTP/2 support and fixes a TypeError when config.env is undefined in fetch adapter.

  • Enable HTTP/2 for requests by configuring the new HTTP2 transport option in your axios client.
  • Update code that passes undefined config.env to fetch adapter to avoid TypeErrors in production.

See how people are using axios

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers