函数计算HTTP求助

我的函数 ruling-proxy 使用官方示例代码(处理HTTP请求)可以正常返回。
但换成转发到 DeepSeek API 的代码后,执行 curl 命令返回 Method Not Allowed。
函数公网地址:https://ruling-proxy-uifctqhhdi.cn-shanghai.fcapp.run
测试命令:

   curl.exe -X POST "https://ruling-proxy-uifctqhhdi.cn-shanghai.fcapp.run" -H "Content-Type: application/json" -H "Authorization: Bearer sk-6f1aae0281704309950b2736807b4747" -d "{\"model\":\"deepseek-chat\",\"messages\":[{\"role\":\"user\",\"content\":\"你好\"}]}"

返回结果:Method Not Allowed
代码已部署,用的是 https.request 转发到 api.deepseek.com。日志只显示 FunctionUnhandledError,没有具体错误信息。
请问问题出在哪里?谢谢!

展开
收起
vanlw6f6cebmy 2026-04-04 19:08:48 35 分享 版权
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:

快速交付实现商业价值。

热门讨论

热门文章

还有其他疑问?
咨询AI助理