
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
reliable-get
Advanced tools
A circuit breaker and cached wrapper for GET requests (enables reliable external service interaction).
Reliable HTTP get wrapper (cache and circuit breaker), best wrapped around things you dont trust very much.
Example options from Compoxure backend request:
var options = {
url: targetUrl,
cacheKey: targetCacheKey,
cacheTTL: targetCacheTTL,
timeout: utils.timeToMillis(backend.timeout || DEFAULT_LOW_TIMEOUT),
headers: backendHeaders,
tracer: req.tracer,
statsdKey: 'backend_' + utils.urlToCacheKey(host),
eventHandler: eventHandler
};
From compoxure fragment request:
var options = {
url: url,
timeout: timeout,
cacheKey: cacheKey,
cacheTTL: cacheTTL,
explicitNoCache: explicitNoCache,
headers: optionsHeaders,
tracer: req.tracer,
statsdKey: statsdKey,
eventHandler: eventHandler
}
Property | Description | Example / Default | Required |
---|---|---|---|
url | Service to get | http://my-service.tes.co.uk | Yes |
timeout | Timeout for service | 5000 | No |
cacheKey | Key to store cached value against | my-service_tes_co_uk | No |
cacheTTL | TTL of cached value | 1 minute | No |
explicitNoCache | Do not cache under any circumstances | false | No |
headers | Headers to send with request | No | |
tracer | Unique value to pass with request | No | |
type | Type of request, used for statsd and logging | No | |
statsdKey | Key that statsd events will be posted to | No | |
eventHandler | Object (see below) for logging and stats | No |
To allow Reliable Get to report back on status, at the moment we require you to pass in a simple object:
var eventHandler = {
logger: function(level, message, data) {},
stats: function(type, key, value) {}
}
This will likely get replaced with a more standard EventEmitter at some point when we get around to it (this is a legacy of the extraction of this code from another project for now).
FAQs
A circuit breaker and cached wrapper for GET requests (enables reliable external service interaction).
The npm package reliable-get receives a total of 25 weekly downloads. As such, reliable-get popularity was classified as not popular.
We found that reliable-get demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.