Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

http-wrap

seanmcgary28MIT1.0.2

Simple wrapper around the HTTP module

request, http

readme

Usage

'use strict';

let Request = require('../');

Request({ method: 'GET', url: 'https://google.com' }) .then((data) => { /* data = { statusCode: <int, status code of the request>, data: <string || object, body of the request. converts to JSON if the content-type is json>, headers: <object, headers from the request>, url: <string, the original url> } */ });