apiz-node-client
v4.0.2
Published
Node client for apiz
Downloads
7
Readme
apiz-node-client
apiz-node-client implements the APIzClient
interface for node, based on got, so you can use options of got.
Usage
import { APIz } from 'apiz-ng';
import apizClient from 'apiz-browser-client';
const apiMeta = {
getBook: {
url: 'http://www.a.com'
}
};
const apis = new APIz(apiMeta, {
client: apizClient({
beforeRequest: [async options => console.log(options)],
afterResponse: [response => console.log(response.statusCode)],
retry: 3
})
})