Registry / devops / dynel-rest-client

dynel-rest-client

JSON →
library0.0.43jsnpmunverified

A REST client framework for the Dynamic Elements platform (dynel). Version 0.0.43 is the latest, with infrequent releases. It provides a structured way to interact with Dynamic Elements REST APIs, offering request/response handling, authentication, and resource management. Heavily tied to the Dynamic Elements ecosystem, with limited standalone use.

npm install dynel-rest-client
INSTALL
IMPORT
SIG · DYNEL-REST-CLIENT
D
dynel-rest-client
devopsjavascriptv0.0.43
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DynelRestClient
import { DynelRestClient } from 'dynel-rest-client'
const DynelRestClient = require('dynel-rest-client')
ESM-only since v0.0.20
DynelRequest
import { DynelRequest } from 'dynel-rest-client'
import DynelRequest from 'dynel-rest-client/DynelRequest'
DynelRequest is a named export, not default.
DynelResponse
import { DynelResponse } from 'dynel-rest-client'
Available as named export.

Shows initializing the client and making a simple GET request with error handling.

import { DynelRestClient, DynelRequest, DynelResponse } from 'dynel-rest-client'; import { DynelConfig } from 'dynel-core'; const config = new DynelConfig({ baseURL: process.env.API_URL ?? 'https://api.dynel.io', apiKey: process.env.API_KEY ?? '' }); const client = new DynelRestClient(config); async function getUser(id: string): Promise<DynelResponse> { const request = new DynelRequest('GET', `/users/${id}`); return client.execute(request); } getUser('123').then(response => console.log(response.data)).catch(err => console.error(err));
Debug
Known issues
gotchaThe DynelRestClient constructor requires a DynelConfig object; passing a plain object throws silently.
fix
Use `new DynelConfig({...})` from dynel-core.
affects: >=0.0.1
deprecatedDynelRestClient.execute() returns DynelResponse but errors are caught internally; use try/catch.
fix
Upgrade to >=0.0.40 and wrap calls in try/catch for reliable error handling.
affects: <0.0.40
gotchaRequests must explicitly set Content-Type header; default is not application/json.
fix
Add `headers: { 'Content-Type': 'application/json' }` to DynelRequest.
affects: >=0.0.1
Errors
Common errors & fixes
Error: No 'dynel-core' module found
Missing dynel-core peer dependency
fix
Run `npm install dynel-core` as a dependency.
TypeError: DynelRestClient is not a constructor
Incorrect import (default vs named)
fix
Use `import { DynelRestClient } from 'dynel-rest-client'`.
Error: Request failed with status 0
Network error or invalid baseURL
fix
Check the baseURL configuration and network connectivity.
Upgrade
Version history
0.0.43latest on npm
Audit
Dependencies
dynel-corerequiredcore Dynamic Elements platform dependency
Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
dynel-rest-client — npm install dynel-rest-client · libregistry