1.2.1 • Published 4 years ago

@sibipro/ask v1.2.1

Weekly downloads
93
License
MIT
Repository
github
Last release
4 years ago

ASK

A simple wrapper for node-fetch

View on NPM

Usage

Add it to your repo.

$ yarn add @sibipro/ask

Require ask at the top of your node.js file.

const ask = require('@sibipro/ask');

Making a GET request.

async function makeRequest() {
    return await ask("http://google.com");
}

Making a POST request.

async function makeRequest(headers) {
    return await ask("http://google.com", { method: "POST", headers, responseType: "json" });
}