sasaxios
v0.0.3sasaxios
sasaxios
is a wrapper for fetch(), but provides an axios-like interface.
This package is not production-ready so that should be used with caution.
Install
$ npm install sasaxios
or
$ yarn add sasaxios
Usage
import sasaxios from "sasaxios";
const axios = sasaxios.create({
baseURL: "https://pokeapi.co/api/v2",
withCredentials: false,
});
// request to https://pokeapi.co/api/v2/pokemon?limit=5&offset=10
axios.get("pokemon", { params: { limit: 5, offset: 10 } }).then((response) => {
console.log(response.data.results[0].name); // metapod
});
npm i [email protected]
Metadata
- ISC
- Whatever
- s_sasaki_0529
- released 1/21/2023