@ingresse/request
v0.0.5
Published
Ingresse Requests utilities based on Fetch API
Downloads
177
Readme
@ingresse/request
ES Module
Facility to use Fetch API.
Usage
Install as development dependency:
yarn add -D @ingresse/request
Example
import { get } from '@ingresse/request';
const term = 'ingresse';
const api = 'https://npmsearch.com/query';
get(api, {
fields: 'name',
q : term,
})
.catch((error) => {
console.error(`Error on search to NPM Packages with "${term}"`, error);
})
.then((response) => {
console.log(`NPM Packages results to "${term}"`, response);
});