HTTP client module for REST API interactions
Classes
- HttpDispatcher
Bridges a
Dispatchto anHttpAdapterby opening aServerEventConnectorthat listens on the adapter's events endpoint and forwards each received event to the registered observers. In subscription mode it also syncs the locally observed topics by subscribing/unsubscribing with the SSE server, correlating each client through ax-correlation-idheader (DecafHeaders.CORRELATION_ID) so the server can scope subscriptions and enforce a single connection per client.
Interfaces
- HttpFlags
Interface extending RepositoryFlags with HTTP-specific options
Namespaces
- axios
This module provides classes and utilities for interacting with REST APIs. It exposes repository and service classes for making HTTP requests, along with type definitions and adapters for different HTTP clients. The module includes
RestRepositoryandRestServicefor API interactions.- hooks
Exposes the webhook models, subscription and delivery services, observers, middleware and utilities that implement Decaf's Observer pattern over webhooks, including topic matching, request signing and retry scheduling.
Members
# inner constant COMMIT
Stores the current git commit hash for the package. The build replaces the placeholder with the actual commit hash at publish time.
Represents the current commit hash of the module build.
# inner constant FULL_VERSION
Stores the semver version and commit hash for the package.
The build replaces the placeholder with the actual <version>-<commit> value at publish time.
Represents the full version string of the module.
Type Definitions
Object
# HttpConfig
Configuration type for HTTP connections specifying protocol and host
HTTP configuration type
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
protocol |
'http'
|
'https'
|
The HTTP protocol to use |
||
host |
string
|
The host address |
||
idInUrl |
boolean
|
<optional> |
true | When true (default), write operations (create, update) include the resource id (and composed pk parts) in the URL path, matching REST semantics. Set to false to POST/PUT against the collection URL only. |
protocol |
"http"
|
"https"
|
|||
host |
string
|
|||
parsers |
Array
|
<optional> |
||
eventsListenerPath |
string
|
<optional> |
||
headers |
boolean
|
<optional> |
||
events |
boolean
|
<optional> |
||
eventsSubscription |
boolean
|
<optional> |
||
eventHeaderResolver |
function
|
<optional> |
||
idInUrl |
boolean
|
<optional> |