Package Exports
- @epilot/discussion-client
- @epilot/discussion-client/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@epilot/discussion-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@epilot/ts-sam-client
API Client for epilot ts-sam API.
Uses openapi-client-axios
Getting Started
Install the package:
npm install --save-dev @epilot/ts-sam-clientImport the package:
import { getClient } from '@epilot/ts-sam-client';Use the client:
// get typed client
const client = await getClient();
// call an operation
const res = await client.testS3();BaseURL & Authorization
To pass an authorization header and set up the API url, you can use axios defaults:
const client = getClient();
client.defaults.baseURL = config.API_URL;
client.defaults.headers['authorization'] = `Bearer ${token}`;