eop-http

1.0.2 • Public • Published

eop-http

一个简单的http请求库

Installation

npm install eop-http

Usage

const { http, curl } = require('../lib/http');
 
http.get('http://127.0.0.1:3000', { name: 'aa' })
    .then(function (res) {
        console.log('res=>', res);
    }).catch(function (err) {
        console.log('err=>', err);
    });
 
let opts = {
    method: 'post',
    url: 'https://127.0.0.1:3000/v1/user'
}
curl(opts)
    .then(function (res) {
        console.log('res=>', res);
    }).catch(function (err) {
        console.log('err=>', err);
    });

Readme

Keywords

none

Package Sidebar

Install

npm i eop-http

Weekly Downloads

1

Version

1.0.2

License

ISC

Unpacked Size

4.3 kB

Total Files

6

Last publish

Collaborators

  • hongliang