vince-http
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

npm-vince-http

使用如下:

npm i vince-http

const http = require('vince-http');
// result是个http类的对象,对象上有request和response
// 参数headers里可以设置cookie(如headers = {cookies:{}),cookie直接设置字典的形式,会自动解析成cookie字符串
// 目前仅支持get,post,put,del(delete)请求方式
const result = await http.get(url = '', params = {}, headers = {});

// body内容在 result.response.body上

Readme

Keywords

Package Sidebar

Install

npm i vince-http

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

7.97 kB

Total Files

7

Last publish

Collaborators

  • liangyongheng