1.4.0 • Published 2 years ago

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

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years 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

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago