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

m-fe-plugin-fetch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-fe-plugin-fetch

命令行请求工具(多用于npm script)

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

m-fe-plugin-fetch

命令行请求工具(多用于npm script)

Getting Started

fe fetch 自动安装和运行

使用

  • fe fetch xxx.com --option=xxx 请求某个接口,并携带参数

在npm中使用

"scripts":{
  "update":"fe fetch xxx.com/api --body-a=1 --b=2 --header-Content-Type=application/json"
}

如果命令中用 ; 需要转义 \;

运行结果为:

headers:{ 'Content-Type': 'application/json' }
body:{ a: 1, b: 2 }

option

参数名类型默认值说明
method'GET'|'POST'|'PUT'|'DELETE''GET'请求方法
urlstring-请求地址
[x:string]string-body或者header的参数,如果是header-开头,则会被处理成headers中的字段,body-或者直接变量名,则直接处理成body中的字段

变量使用说明

headersbody 中如果值为 @ 开头的字符串,则,从 package.json 中提取变量,比如: @version 表示 package.json 中的 version 字段, @repository.url 代表 package.json 中的 repository 对象下的 url 字段

Keywords

FAQs

Package last updated on 02 May 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