将内容处理参数添加到 AWS PROXY

问题描述

几天前我在 Serverless forum 上问过这个问题,但没有收到回复,所以我想在这里试试。

我正在构建一个返回 PDF 的无服务器函数。在我的活动配置中(从打字稿启动器修改):

export default {
  handler: `${__dirname.split(process.cwd())[1].substring(1)}/handler.main`,events: [
{
  http: {
    method: "post",path: "generateForm",request: {
      contentHandling: <const>"CONVERT_TO_BINARY",schema: {
        "application/json": schema,},],};

部署时出现错误:

Warning! You’re using the AWS_PROXY in combination with a request configuration in your function “generateForm”. Only the request.parameters,request.schema configs are available in conjunction with AWS_PROXY. Serverless will remove this configuration automatically before deployment.

但是在测试时它似乎正确返回了二进制文件。我可以安全地忽略此错误吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)