/
githubmirror
/
axios
Обзор
Документация
Войти
/
githubmirror
/
axios
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v1.x
sandbox/client.js
20 строк
394 B
Jay
feat: implement prettier and fix all issues (#7385)
14 фев 2026, 17:59
Не верифицирован
14 фев 2026, 17:59
ef3711d
Код
Авторство
О чём код?
import axios from '../index.js'; const URL = 'http://127.0.0.1:3000/api'; const BODY = { foo: 'bar', baz: 1234, }; function handleSuccess(data) { console.log(data); } function handleFailure(data) { console.log('error', data); } // GET axios.get(URL, { params: BODY }).then(handleSuccess).catch(handleFailure); // POST axios.post(URL, BODY).then(handleSuccess).catch(handleFailure);