开发者社区 > 云原生 > 正文

请教一下: 函数式计算请求地址: http://api-query-wzhjecigpf.cn-ha

请教一下: 函数式计算请求地址: http://api-query-wzhjecigpf.cn-hangzhou.fcapp.run/invoke 请求方式:application/json 请求参数:{"test":"test1"}

请求网关: queryApi/绑定了上面函数服务

问题:网关报如下错误: Request: Url: http://de7fb0c7e72141d29c77e16ae271566d-cn-hangzhou.alicloudapi.com/api/api/wsGetTerminalDetails/V1/1Main/vV1.1 Header: {"X-Ca-Timestamp":"1670294677395","gateway_channel":"http","X-Ca-Key":"agkApi_demo123","x-ca-nonce":"8e96d6b5-af1d-4afc-9a3c-595856f7f504","X-Ca-Request-Mode":"DEBUG","X-Ca-Stage":"TEST","X-Ca-Supervisor-Token":"eyJhbGciOiJSUzI1NiJ9.eyJpYXQiOjE2NzAyOTQ2NzcsIm5iZiI6MTY3MDI5NDYxNywiaXNzIjoiQWxpeXVuQXBpR2F0ZXdheSIsInJvbGUiOiJ1c2VyIiwiYXVkIjoiYXBpLXNoYXJlZC12cGMtMDAyIiwiZXhwIjoxNjcwMjk1NTc3LCJqdGkiOiI4OWI0ZDE5MDEyMWM0OTY2YTRhN2NjN2NjYTVjOGQxZSIsImFjdGlvbiI6IkRFQlVHIiwidWlkIjoiMTU1MTc3NjI5NjAyMDk2MyJ9.d_km1CA4sFrDSKa3hX5yL6aqAMScFd7QCiTxm790uhWTJFN1uMgbnMbPFsrnKWvDYN2vBKcB6xWAXYjLSz-OAh0iph6zTG9eW0TiSiz4JijEtkLL3d4WifDzi5fusrJmzSKx8YXDHEjgp5NdEqrytkDc_vFEoAT0eYpkdxxu830eV5QGyHIZzc4S0IIi42zkawa8Gfsone0ooXm7zEB91MRfZnh0XIFihnhE15QZmBBMwlb5JchlmQ_0GEdXxZksX7wUIOrAkt6ye6pzfD-SYWgEPumXJAnTTKO0dwUtpGJAuM_RyiqnZLQzhsEpUTbPJYfw3l-aKf3ttiovY20hKQ","Host":"de7fb0c7e72141d29c77e16ae271566d-cn-hangzhou.alicloudapi.com","X-Ca-Signature":"RrMbP4CfzO7tMGMKQjDtlY84M0PY4MC/ehtVDoQ9HMU=","Content-Type":"application/json; charset=utf-8","Content-MD5":"j+CJ1xOm667oejfErLzfIg==","X-Ca-Signature-Headers":"X-Ca-Timestamp,X-Ca-Key,X-Ca-Request-Mode,X-Ca-Stage,X-Ca-Supervisor-Token"} Body: "{\n "data": {\n "iccids": ["89860618000045173940"],\n "openId": "32316outo9AqmTa",\n "messageId": "1",\n "version": "1.0"\n },\n "trans_id": "2022120115241795796369",\n "app_id": "bU6cVSXPaA",\n "token": "96a4f03290efb5669375b2a3d75c67ba1ab21abcd15e511c7e6c2f7ade4221e4",\n "timestamp": "2022-12-01 15:24:17 957"\n}"

Response: 400 Date: Tue, 06 Dec 2022 02:44:37 GMT Content-Type: application/json; charset=utf-8 Content-Length: 128 Connection: keep-alive Keep-Alive: timeout=25 X-Fc-Error-Type: FCCommonError X-Ca-Request-Id: BF3AA616-91A1-4BF4-BC0F-8458EEEB73DE Content-Disposition: attachment; filename=ApiResponseForInnerDomain X-Fc-Request-Id: BF3AA616-91A1-4BF4-BC0F-8458EEEB73DE

{"ErrorCode":"InvalidArgument","ErrorMessage":"Function with http trigger(name: api) can only be invoked with http trigger URL"}

提问17.png

展开
收起
云上静思 2022-12-06 14:45:03 440 0
1 条回答
写回答
取消 提交回答
  • 应该是api网关配置错了 选http函数类型的

    此答案来自钉钉群“阿里函数计算官网客户"

    2022-12-06 18:17:10
    赞同 展开评论 打赏
问答分类:
问答地址:

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
ACE 区域技术发展峰会:Flink Python Table API入门及实践 立即下载
Java Spring Boot开发实战系列课程【第15讲】:Spring Boot 2.0 API与Spring REST Docs实战 立即下载
Spring Boot2.0实战Redis分布式缓存 立即下载