← ClaudeAtlas

axioslisted

Axios - promise-based HTTP client for browser and Node.js USE WHEN: user mentions "Axios", "HTTP requests", "API calls", "interceptors", "Axios instance", asks about "how to make HTTP calls", "configure Axios", "add auth header", "handle HTTP errors" DO NOT USE FOR: Fetch API - use `http-clients` instead; ky/ofetch - use `http-clients` instead; GraphQL clients - use `graphql-codegen` instead; tRPC - use `trpc` instead
claude-dev-suite/claude-dev-suite · ★ 33 · AI & Automation · score 80
Install: claude install-skill claude-dev-suite/claude-dev-suite
# Axios - Quick Reference ## When to Use This Skill - HTTP requests in JavaScript/TypeScript applications - Configuring interceptors for auth/error handling - Creating Axios instances for specific APIs - Request/response transformation - File uploads and downloads > **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `axios` for comprehensive documentation. ## Setup Base ```bash npm install axios ``` ## Pattern Essenziali ### GET Request ```typescript import axios from 'axios'; const response = await axios.get('/api/users'); const users = response.data; // With params const response = await axios.get('/api/users', { params: { page: 1, limit: 10 } }); ``` ### POST Request ```typescript const response = await axios.post('/api/users', { name: 'John', email: 'john@example.com' }); ``` ### Axios Instance ```typescript const api = axios.create({ baseURL: 'https://api.example.com', timeout: 10000, headers: { 'Content-Type': 'application/json' } }); // Use instance const users = await api.get('/users'); ``` ### Interceptors ```typescript // Request interceptor (add auth token) api.interceptors.request.use( (config) => { const token = localStorage.getItem('token'); if (token) { config.headers.Authorization = `Bearer ${token}`; } return config; }, (error) => Promise.reject(error) ); // Response interceptor (handle errors) api.interceptors.response.use( (response) => response, (error) => { if (error.respo