Axios is the HTTP client that became the de facto standard because it just works everywhere. You get a clean promise-based API for making requests in both browser and Node.js, with built-in interceptors for adding auth tokens or handling retries, and error handling that actually distinguishes between network failures and server errors. The real win is the interceptor pattern, it makes cross-cutting concerns like authentication, logging, and error handling trivial to implement once and forget about. If you're working with REST APIs or need reliable HTTP requests with progress tracking, timeouts, and automatic JSON transforms, this is the obvious choice.
- skills.sh installs
- 211
- GitHub stars
- 2
- last updated
- Aug 21, 2026
Install
$ npx -y skills add slanycukr/riot-api-project --skill axios --agent claude-codeInstalls into .claude/skills of the current project.
Files
Axios HTTP Client
Axios is a promise-based HTTP client for the browser and Node.js. It provides a simple API for making HTTP requests and handling responses.
Quick Start
Basic GET Request
import axios from "axios";
// Promise-based
axios
.get("/user?ID=12345")
.then((response) => console.log(response.data))
.catch((error) => console.error(error));
// Async/await
async function getUser() {
try {
const response = await axios.get("/user?ID=12345");
console.log(response.data);
} catch (error) {
console.error(error);
}
}
Basic POST Request
axios
.post("/user", {
firstName: "John",
lastName: "Doe",
})
.then((response) => console.log(response.data))
.catch((error) => console.error(error));
Common Patterns
Custom Instance
const api = axios.create({
baseURL: "https://api.example.com",
timeout: 1000,
headers: { "X-Custom-Header": "foobar" },
});
// Use the instance
api.get("/users").then((response) => console.log(response.data));
Request with Configuration
Sponsors
Details
- Repository
- github.com/slanycukr/riot-api-project
- Categories
- Backend & APIs, Automation & Workflows
- First seen
- Jun 3, 2026
