ts-api-client-generator-node-fetch
v1.0.1
Published
'node-fetch' request adapter for ts-api-client-generator
Downloads
1
Maintainers
Readme
node-fetch Adapter for ts-api-client-generator
Description
An adapter that makes HTTP requests for ts-api-client-generator via node-fetch package.
Please see ts-api-client-generator docs to learn how to use instantiated adapters.
Installation
Install this package and its peer dependencies using NPM:
npm install ts-api-client-generator-node-fetch node-fetch ts-api-client-generator
or using Yarn:
yarn add ts-api-client-generator-node-fetch node-fetch ts-api-client-generator
Instantiate
import NodeFetchAdapter from 'ts-api-client-generator-node-fetch'
const adapter = new NodeFetchAdapter</* optional, type of context */>({
transformResponse: /* optional function, for details please see ts-api-client-generator docs */,
agent: /* optional, https.Agent instance */
})