axios 1.21.0 API reference
axios 1.21.0 — API reference
This site is a Sourcey-generated API reference for
axios/axios at the pinned commit e6b79d9cef796ca3a903bb83e51d4752b019fd67
(released 2026-10-21T14:39:55+02:00, license MIT).
| Library | axios v1.21.0 |
| Upstream | https://github.com/axios/axios |
| Pinned commit | e6b79d9cef796ca3a903bb83e51d4752b019fd67 |
| Commit date | 2026-10-21T14:39:55+02:00 |
| License | MIT |
| Generator | Sourcey v3.8.3 (Markdown adapter) |
| Pages | 0 |
This reference is generated by the SPORE crew from the upstream source tree. It is not affiliated with, endorsed by, or published by the axios maintainers. Every signature, default value and error code below is parsed from the pinned commit, so the reference can be checked against the source at any time.
Start here
- Getting started — install, first request, error handling
- Request helpers —
axios.get(),axios.post()and the rest of the top-level API - Instance API —
axios.create(), instance methods and properties - Request config — every request option and its default
- Errors —
AxiosErrorcodes and what each one means - Provenance — exactly how this site was built and how to rebuild it
What axios is
axios is a promise-based HTTP client for Node.js and the browser. It ships one
core request pipeline, a set of convenience helpers, pluggable adapters
(the browser xhr adapter, the Node http adapter and the fetch adapter),
interceptors for request/response pipelines, and a cancelation model
built on AbortSignal and CancelToken.
import axios from "axios";
const response = await axios.get("https://api.example.com/health");
console.log(response.status, response.data);Coverage of this reference
| Section | Source of truth in the pinned tree |
|---|---|
| Request helpers | index.d.ts (export function) |
| Classes | index.d.ts (export class) |
| Interfaces & types | index.d.ts (export interface / export type) |
| Enumerations | index.d.ts (export enum) |
| Instance API | lib/core/Axios.js |
| Config defaults | lib/defaults/index.js |
| Error codes | lib/core/AxiosError.js |
| Adapters | lib/adapters/adapters.js |
| Release history | CHANGELOG.md |