@vect.io/api.fetch.parameter.client.binding.node
v0.4.2
Published
The [Parameter API](https://docs.vect.io/Parameter-API-14dd170381708091846ce750b38078db) provides access to selected files through Shares.
Downloads
247
Keywords
Readme
Vect Parameter API Node 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.node
Usage
import Client from '@vect.io/api.fetch.parameter.client.binding.node'
const client = new Client({ repository: 'acme-com/acme-com-2024v1', shareName: 'public' });
await client.getFile({ path: 'example.json' });
Configuring requests
Requests can be configured by passing gotOptions
, both per-client (through the constructor) and per-request (through getFile
).
For secure requests, you can pass signingGotOptions
to modify the request to the Vect signing service.
For reference see got
options documentation.
Throwing on unsuccessful requests
To prevent throwing on unsuccessful requests (not 2xx/3xx), you can pass throwHttpErrors: false
.
More
The Client uses got
under the hood to make requests. You can also use plain curl
if you prefer:
curl 'https://file.parameter.fetch.api.vect.io/v1/acme-com/acme-com-2024v1/live/shares/public/example.json'
Copyrighted by Vect.