@kameleoon/nodejs-requester
v1.2.0
Published
Kameleoon NodeJS SDK Requester
Downloads
2,024
Readme
Kameleoon NodeJS SDK Event Source
Introduction
Kameleoon NodeJS SDK Requester is a small helper package which provides default implementation for Kameleoon NodeJS SDK external Requester built on top of NodeJS node-fetch
library.
For more information refer to Official Kameleoon Documentation
Contents
Installation
- npm -
npm install @kameleoon/nodejs-requester
- yarn -
yarn add @kameleoon/nodejs-requester
- pnpm -
pnpm add @kameleoon/nodejs-requester
- bun -
bun install @kameleoon/nodejs-requester
Configuration
While using @kameleoon/nodejs-sdk
:
- Import
KameleoonRequester
- Instantiate and pass it to external SDK dependencies
import { KameleoonClient } from '@kameleoon/nodejs-sdk';
import { KameleoonRequester } from '@kameleoon/nodejs-requester';
const client = new KameleoonClient({
siteCode: 'my_site_code',
credentials: {
clientId: 'my_id',
clientSecret: 'my_secret',
},
externals: {
requester: new KameleoonRequester(),
},
});