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

@roshan-labs/http-module

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@roshan-labs/http-module

封装内部 `$fetch` 和 `useFetch` 方法,可统一配置 `baseURL`,新建实例也可继承老配置

  • 0.5.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

@roshan-labs/http-module

封装内部 $fetchuseFetch 方法,可统一配置 baseURL,新建实例也可继承老配置

安装

yarn add @roshan-labs/http-module -D

API

通过 useHttp 组合式函数导出以下 API 使用

create

传入 $fetch 相同配置,创建新 http 实例

useHttp().create(options)
  • options: $fetch 配置参数

request

发起一个 http 请求

useHttp().request(url, options)
  • url: 请求地址
  • options: $fetch 配置参数

许可

MIT

FAQs

Package last updated on 06 Jan 2023

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