1.4.0 • Published 8 months ago

@adv-ui/ij-axios-interceptor v1.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

npm.io

Jobs Axios interceptors

Description

This is a package where some general axios interceptors can be setted to use in different projects.

Features

Intercept request regarding the tenant

The setBlockingInterceptor method purpose is to block requests depending on the tenant we provide

import AxiosInterceptor from '@adv-ui/ij-axios-interceptor'
import {FetcherFactory} from '@s-ui/domain'

const fetcher = FetcherFactory.httpFetcher({
  config: {}
})

const filterTenantPaths = [
  {
    tenant: 'infojobs',
    whiteListPaths: [{path: '/users', method: 'GET'}, {path: '/user/:id'}]
  }
]

const axiosInterceptor = new AxiosInterceptor()

axiosInterceptor.setBlockingInterceptor({
  fetcher,
  currentTenant: 'infojobs',
  filterTenantPaths
})

Release a new version

Once you have merged your changes, the @s-ui/ci tool will automatically release a new minor version for the dependency @s-ui/ij-axios-interceptor

1.4.0

8 months ago

1.3.0

11 months ago

1.2.0

11 months ago

1.1.0

11 months ago