Socket
Socket
Sign inDemoInstall

ngx-http-resilience

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-http-resilience - npm Package Compare versions

Comparing version 0.2.5 to 0.3.2

2

lib/retry/error-predicates/with-status-codes.d.ts

@@ -20,3 +20,3 @@ import { HttpStatusCode } from '@angular/common/http';

*/
export declare const STANDARD_RETRYABLE_STATUS_CODES: HttpStatusCode[];
export declare const STANDARD_RETRYABLE_STATUS_CODES: readonly [HttpStatusCode.RequestTimeout, HttpStatusCode.BadGateway, HttpStatusCode.ServiceUnavailable, HttpStatusCode.GatewayTimeout];
/**

@@ -23,0 +23,0 @@ * Match any error with a status code matching the given options.

import { HttpInterceptorFn } from '@angular/common/http';
import { RetryPolicy } from './types';
import { RetryInterceptorOptions, RetryPolicy } from './types';
/**

@@ -15,3 +15,3 @@ * Creates an HttpInterceptorFn that will retry requests based on the provided

*/
export declare function createHttpRetryInterceptorFn(policy: RetryPolicy): HttpInterceptorFn;
export declare function createHttpRetryInterceptorFn(policy: RetryPolicy, options?: RetryInterceptorOptions): HttpInterceptorFn;
export declare function validateRetryStrategy(strategy: RetryPolicy): void;
import { HttpEvent, HttpHandlerFn, HttpRequest } from '@angular/common/http';
import { Observable } from 'rxjs';
import { RetryPolicy } from '../types';
export declare function retryRequestWithStrategy(req: HttpRequest<unknown>, next: HttpHandlerFn, strategy: RetryPolicy): Observable<HttpEvent<unknown>>;
import { Observable, Subject } from 'rxjs';
import { RetryInterceptorEvent, RetryPolicy } from '../types';
export declare function retryRequestWithStrategy(req: HttpRequest<unknown>, next: HttpHandlerFn, strategy: RetryPolicy, events$: Subject<RetryInterceptorEvent>): Observable<HttpEvent<unknown>>;
import { HttpRequest } from '@angular/common/http';
import { Subject } from 'rxjs';
import { RetryState } from './internal';

@@ -19,2 +20,29 @@ export type Predicate<T> = (input: T) => boolean;

}
export type RetryInterceptorRequestType = 'Ignored' | 'Failed' | 'Succeeded';
export declare const RetryInterceptorRequestTypes: {
readonly Ignored: "Ignored";
readonly Failed: "Failed";
readonly Succeeded: "Succeeded";
};
interface BaseRetryInterceptorRequest {
req: HttpRequest<unknown>;
type: RetryInterceptorRequestType;
}
export interface RetryInterceptorRequestIgnoredEvent extends BaseRetryInterceptorRequest {
type: 'Ignored';
}
export interface RetryInterceptorRequestFailedEvent extends BaseRetryInterceptorRequest {
type: 'Failed';
error: unknown;
attempt: number;
}
export interface RetryInterceptorRequestSucceededEvent extends BaseRetryInterceptorRequest {
type: 'Succeeded';
res: unknown;
attempt: number;
}
export type RetryInterceptorEvent = RetryInterceptorRequestIgnoredEvent | RetryInterceptorRequestFailedEvent | RetryInterceptorRequestSucceededEvent;
export interface RetryInterceptorOptions {
events$?: Subject<RetryInterceptorEvent>;
}
export interface PredicateBuilder<T> {

@@ -24,1 +52,2 @@ build: () => Predicate<T>;

}
export {};
{
"name": "ngx-http-resilience",
"version": "0.2.5",
"version": "0.3.2",
"description": "Angular HttpInterceptors that provide resiliency capabilities ",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc