Axios endpoint
Manage and create axios requests without a hassle
Installation
npm i axios-endpoint
Usage
Import it
let route = ;// es6;
(Optional) Configure axios as you like
const axios = ;axiosdefaultsbaseURL = "https://jsonplaceholder.typicode.com";
Use it
let endpoint = getTodos: getTodosBefore: getTodosAfter: getTodosBeforeAfter: ; endpoint ;endpoint ;endpoint ;endpoint ;
Callback hooks
before
runs exactly before making the request
after
runs exactly after making the request
Run tests
npm run test