@cray/ajiax

2.0.3 • Public • Published

Ajiax

node simple request.

npm install --save @cray/ajiax

use

const ajiax = require('@cray/ajiax');

ajiax.get();
ajiax.post();

return Promise.

get({uri,resolveWithFullResponse,headers,query , timeout})

  • uri : get requset url.
  • resolveWithFullResponse : only return success or error data if resolveWithFullResponse = false. default false.
  • headers : request header.
  • query : url query data , type : Object.
  • timeout: number | 15000.

get(uri)

post({uri,resolveWithFullResponse,headers,query,body,timeout})

  • uri : post requset url.
  • resolveWithFullResponse : only return success or error data if resolveWithFullResponse = false. default false.
  • headers : request header.
  • query : url query data , type : Object.
  • body : post's data , type : Object.
  • timeout: number | 15000

post(url)

Readme

Keywords

Package Sidebar

Install

npm i @cray/ajiax

Weekly Downloads

2

Version

2.0.3

License

ISC

Unpacked Size

6.8 kB

Total Files

4

Last publish

Collaborators

  • cray