@echelon-framework/transport-http
v0.7.1
Published
HTTP TransportAdapter dla Echelon — real `fetch` one-shot requests.
Maintainers
Readme
@echelon-framework/transport-http
HTTP TransportAdapter for Echelon framework — fetch-based, with retry and timeout.
Part of the Echelon Framework — Angular-based, config-driven dashboard & low-code platform.
Installation
npm install @echelon-framework/transport-httpUsage
import { HttpTransportAdapter } from '@echelon-framework/transport-http';
// Registered automatically by provideEchelon when HTTP endpoints configured
provideEchelon({
endpoints: {
'api/clients': { url: '/api/clients', method: 'GET' },
'api/client': { url: '/api/clients/:id', method: 'GET' },
'api/client-create': { url: '/api/clients', method: 'POST' },
},
});Features
- fetch-based — native browser API, no XMLHttpRequest
- Retry — configurable retry count with exponential backoff
- Timeout — per-request timeout with AbortController
- Interceptors — auth headers, CSRF tokens, error mapping
- Base URL — configurable per environment
Configuration
HttpTransportAdapter.create({
baseUrl: '/api',
timeout: 30000,
retries: 3,
headers: { Authorization: 'Bearer ...' },
});License
BUSL-1.1
