This is the Vonage Vetch
er SDK for Node.js used to wrap a request using node-fetch
to call Vonage APIs. To use it you will need a Vonage account. Sign up for free at vonage.com.
For full API documentation refer to developer.vonage.com.
npm install @vonage/vetch
yarn add @vonage/vetch
Vetch will return a VetchResponse
const { request } = require('@vonage/vetch');
const response = await request({
url: 'https://rest.nexmo.com/account/numbers'
})
console.log(response.data);
// Will output the json data from the API response
options
are a superset from the request package. See VetchOptions
for more detail
Run:
npm run test