1.0.0 • Published 10 months ago

gray-ckb v1.0.0

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

Introduction

发起请求时会在 headers 上添加 X-Route-Token、X-Route-Tag 两条信息

Installation

npm i @sniff/gray

Usage

import gray from '@sniff/gray'

const baseUrl = 'https://xxx-gateway.theckb.com/'

const graify=gray(baseUrl)

// with axios 在发起请求前修改 AxiosRequestConfig
axios.interceptors.request.use(function(config){
  // ...do something
  graify(config)
  return config
})

// with fetch
// ...
1.0.0

10 months ago