axios-basic-logger
v1.0.0
Published
Axios logging interceptors
Downloads
2
Readme
axios-basic-logger
Axios logging interceptors
Table of Contents
Install
This project uses node and npm.
$ npm install axios-basic-logger
$ # OR
$ yarn add axios-basic-logger
Usage
import axios from "axios";
import useLogger from "axios-basic-logger";
useLogger(axios);
axios
.get("https://jsonplaceholder.typicode.com/todos")
.then(() => console.log("ja"));
// REQUEST 10:35:16:244 GET https://jsonplaceholder.typicode.com/todos
// RESPONSE 10:35:16:283 200 (GET https://jsonplaceholder.typicode.com/todos) 39ms
// ja
Contribute
- Fork it and create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am "Add some feature"
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
License
MIT