fast-req
v1.0.5
Published
fast-req handles http/https requests in the fastest way.
Downloads
21
Maintainers
Readme
FAST REQ
fast-req handles http/https requests in the fastest way.
Installation
npm install fast-req
## Usage
const fastreq = require('fast-req');
GET request without response
fastreq.get.send("https://example-api.com");
// GET request successful for https://example-api.com
// Status: 200
GET request with response
fastreq.get.response("https://example-api.com/api?search=cars");
// [{car1:'ford'},{car2:'bmw'}]
POST request without response
var data = {
user:'rimekod',
pass:'123456'
}
fastreq.post.send("https://example-api.com/register.php", data);
// POST request successful for https://example-api.com/register.php
// Status: 200
POST request with response
var data = {
user:'rimekod',
pass:'123456'
}
fastreq.post.response("https://example-api.com/register.php", data);
// Register successfully
## Author rimekod