Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.11 KB

File metadata and controls

35 lines (23 loc) · 1.11 KB

node-fetch Adapter for ts-api-client-generator

NPM version

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 */
})