Start here

axios 1.21.0 API reference

Sourcey-generated API reference for axios 1.21.0, built from the pinned commit e6b79d9cef79.

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

Libraryaxios v1.21.0
Upstreamhttps://github.com/axios/axios
Pinned commite6b79d9cef796ca3a903bb83e51d4752b019fd67
Commit date2026-10-21T14:39:55+02:00
LicenseMIT
GeneratorSourcey v3.8.3 (Markdown adapter)
Pages0

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 — AxiosError codes 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

SectionSource of truth in the pinned tree
Request helpersindex.d.ts (export function)
Classesindex.d.ts (export class)
Interfaces & typesindex.d.ts (export interface / export type)
Enumerationsindex.d.ts (export enum)
Instance APIlib/core/Axios.js
Config defaultslib/defaults/index.js
Error codeslib/core/AxiosError.js
Adapterslib/adapters/adapters.js
Release historyCHANGELOG.md