更新时间:2025-08-12 gmt 08:00
测试函数-j9九游会登录
- 测试托管方式改造函数,调用方法如图1所示。
图1 测试函数调用的方法
- 测试独立函数。
- 统一使用post请求。
- 请求url为添加事件源创建的apig触发器地址。
- body体参考如下格式进行配置,如图3所示,在函数代码中可以根据需要,通过apigtriggerevent对象获取相应的值。
图3 body体
{ "body": "xxxxxx", "requestcontext": { "apiid": "xxxx", "requestid": "xxxxx", "stage": "release" }, "querystringparameters": { "responsetype": "html" }, "httpmethod": "post", "pathparameters": {}, "headers": { "accept-language": "zh-cn,zh;q=0.8,zh-tw;q=0.7,zh-hk;q=0.5,en-us;q=0.3,en;q=0.2", "accept-encoding": "gzip, deflate, br", "x-forwarded-port": "443", "x-forwarded-for": "xxxxxx", "accept": "text/html,application/xhtml xml,application/xml;q=0.9,*/*;q=0.8", "upgrade-insecure-requests": "1", "host": "xxxxxxxx", "x-forwarded-proto": "https", "pragma": "no-cache", "cache-control": "no-cache", "x-real-ip": "xxxxxxxx", "user-agent": "mozilla/5.0 (windows nt 6.1; win64; x64; rv:57.0) gecko/20100101 firefox/57.0" }, "path": "", "isbase64encoded": true }
相关文档
意见反馈
文档内容是否对您有帮助?
提交成功!非常感谢您的反馈,我们会继续努力做到更好!
您可在查看反馈及问题处理状态。
系统繁忙,请稍后重试
如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨
