New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xtdev/bff-request

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xtdev/bff-request

a http request for xiantan BFF

  • 0.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

BFF Request

基于axios二次封装,应用于仙潭BFF请求统一管理。

使用

  1. 安装依赖
    npm install @xtdev/bff-request
  1. 引入使用
import XTHttp from '@xtdev/bff-request';

const request = new XTHttp('http://yourhost');
// 请求拦截
request.requestInterceptor(function(config){return config});
// 响应拦截
request.responseInterceptor(function(response){return response});
// get请求
request.get('/paipath', {params1: 'your request path'});
// post请求自定义header
request.post('/paipath', {params1: 'your request path'},{
    headers:{
        'Content-Type':'application/json'
    }
});

Keywords

FAQs

Package last updated on 24 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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