Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.3.2 to 0.3.3

1

lib/retry/http-retry-interceptor.fn.d.ts

@@ -8,2 +8,3 @@ import { HttpInterceptorFn } from '@angular/common/http';

* @param policy The retry strategy to use
* @param options Additional options for the interceptor
*

@@ -10,0 +11,0 @@ * @example

7

lib/retry/http-retry-interceptor.service.d.ts
import { HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
import { RetryPolicy } from './types';
import { Observable } from 'rxjs';
import { RetryInterceptorEvent, RetryPolicy } from './types';
export declare class HttpRetryInterceptorService implements HttpInterceptor {
private readonly interceptorFn;
private readonly events$;
private constructor();
static create(policy: RetryPolicy): HttpRetryInterceptorService;
intercept(req: HttpRequest<unknown>, next: HttpHandler): import("rxjs").Observable<import("@angular/common/http").HttpEvent<unknown>>;
intercept(req: HttpRequest<unknown>, next: HttpHandler): Observable<import("@angular/common/http").HttpEvent<unknown>>;
observeEvents(): Observable<RetryInterceptorEvent>;
}

@@ -20,3 +20,3 @@ import { Observable } from 'rxjs';

* @param predicate The predicate to wrap
* @param initialDisabledState The initial disabled state of the predicate, defaults to false
* @param initiallyDisabled The initial disabled state of the predicate, defaults to false (enabled)
*

@@ -30,2 +30,2 @@ * @example

*/
export declare function createDisableablePredicate(predicate: RequestPredicate, initialDisabledState?: boolean): DisableablePredicate;
export declare function createDisableablePredicate(predicate: RequestPredicate, initiallyDisabled?: boolean): DisableablePredicate;

@@ -45,2 +45,5 @@ import { HttpRequest } from '@angular/common/http';

export interface RetryInterceptorOptions {
/**
* An optional Subject for emitting retry events
*/
events$?: Subject<RetryInterceptorEvent>;

@@ -47,0 +50,0 @@ }

{
"name": "ngx-http-resilience",
"version": "0.3.2",
"version": "0.3.3",
"description": "Angular HttpInterceptors that provide resiliency capabilities ",

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

@@ -22,16 +22,9 @@ ![License](https://img.shields.io/github/license/ebh/ngx-http-resilience)

```typescript
#
app.config.ts
import {provideHttpClient, withInterceptors} from '@angular/common/http';
import {ApplicationConfig} from '@angular/core';
import {
HttpVisibilityInterceptorError,
HttpVisibilityInterceptorHttpEvent,
createHttpVisibilityInterceptorFn,
} from 'ngx-http-resilience';
import {Subject} from 'rxjs';
// app.config.ts
import { provideHttpClient, withInterceptors } from '@angular/common/http';
import { ApplicationConfig } from '@angular/core';
import { HttpVisibilityInterceptorError, HttpVisibilityInterceptorHttpEvent, createHttpVisibilityInterceptorFn } from 'ngx-http-resilience';
import { Subject } from 'rxjs';
export const httpEvents$ = new Subject<
HttpVisibilityInterceptorHttpEvent<unknown>
>();
export const httpEvents$ = new Subject<HttpVisibilityInterceptorHttpEvent<unknown>>();
export const errors$ = new Subject<HttpVisibilityInterceptorError>();

@@ -51,10 +44,8 @@ const visibilityInterceptor = createHttpVisibilityInterceptorFn({

```typescript
#
app.config.ts
import {HTTP_INTERCEPTORS} from '@angular/common/http';
import {ApplicationConfig} from '@angular/core';
import {HttpVisibilityInterceptorService} from 'ngx-http-resilience';
// app.config.ts
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { ApplicationConfig } from '@angular/core';
import { HttpVisibilityInterceptorService } from 'ngx-http-resilience';
export const visibilityInterceptorService =
new HttpVisibilityInterceptorService();
export const visibilityInterceptorService = new HttpVisibilityInterceptorService();

@@ -61,0 +52,0 @@ export const httpInterceptorProviders = [

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