0.4.5 • Published 5 months ago

@vect.io/api.fetch.parameter.client.binding.node v0.4.5

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

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'
  • This package is ESM only, in order to import from CommonJS use require in a supporting node version


Copyrighted by Vect.

0.4.5

5 months ago

0.4.4

5 months ago

0.4.3

5 months ago

0.4.2

7 months ago

0.4.1

7 months ago

0.4.0

7 months ago

0.3.2

8 months ago

0.3.1

8 months ago

0.3.0

8 months ago

0.2.3

8 months ago

0.2.2

8 months ago

0.2.0

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago