Fcapi
云函数http触发器实现api接口
安装
npm i fcapi
使用
- 只接受
POST
方法,其他类型的请求将被拒绝并返回500错误 - 不解析URL参数
- 请求体只接受
JSON
格式的数据,并且需要设置Content-Type
- 返回的函数是底部函数,可以和其他中间件配合使用,如:
mongoing
- 逻辑内部可直接抛出错误,错误将作为结果返回
const fcapi = exportshandler =
云函数http触发器实现api接口
npm i fcapi
POST
方法,其他类型的请求将被拒绝并返回500错误JSON
格式的数据,并且需要设置Content-Type
mongoing
const fcapi = exportshandler =
npm i fcapi
1
1.2.2
MIT
2.12 kB
3