@vect.io/api.fetch.parameter.client.binding.web
v0.4.2
Published
The [Parameter API](https://docs.vect.io/Parameter-API-14dd170381708091846ce750b38078db) provides access to selected files through Shares.
Downloads
296
Keywords
Readme
Vect Parameter API Web Client
The Parameter API provides access to selected files through Shares.
Reading is secure, fault-tolerant, and cached - ensured by RFC compliant interfaces.
We recommend reading the Parameter API Docs.
Getting Started
Install
npm install @vect.io/api.fetch.parameter.client.binding.web
You can use CDN over npm such as
Usage
import Client from '@vect.io/api.fetch.parameter.client.binding.web'
const client = new Client({ repository: 'acme-com/acme-com-2024v1', shareName: 'public' });
await client.getFile({ path: 'example.json' });
Custom fetch
The Client uses the globalThis.fetch
method by default.
To use a different fetch function you can pass the fetch
argument with the desired function when constructing a Client.
Note that this function must be compatible with the Fetch API.
Configuring requests
Requests can be configured by passing fetchOptions
, both per-client (through the constructor) and per-request (through getFile
).
For reference see fetch
options documentation.
Copyrighted by Vect.