@cray/ajiax
v2.0.3
Published
node simple request
Downloads
5
Readme
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
. defaultfalse
. - 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
. defaultfalse
. - headers : request header.
- query : url query data , type : Object.
- body : post's data , type : Object.
- timeout: number | 15000