带有AWS Polly的AWS API Gateway:控制台TEST中的二进制文件,curl上的base64

时间:2019-01-14 16:39:59

标签: amazon-web-services aws-api-gateway amazon-polly

我的终点是:

{
  "swagger": "2.0",
  "info": {
    "version": "2019-01-14T16:21:53Z",
    "title": "audio-builder"
  },
  "host": "ij6dyda1c4.execute-api.eu-west-1.amazonaws.com",
  "basePath": "/test",
  "schemes": [
    "https"
  ],
  "paths": {
    "/": {
      "post": {
        "consumes": [
          "application/json",
          "application/x-www-form-urlencoded"
        ],
        "produces": [
          "audio/ogg"
        ],
        "responses": {
          "200": {
            "description": "200 response",
            "schema": {
              "$ref": "#/definitions/Empty"
            },
            "headers": {
              "Access-Control-Allow-Origin": {
                "type": "string"
              },
              "Content-Type": {
                "type": "string"
              },
              "x-amazon-apigateway-binary-media-types": {
                "type": "string"
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Empty": {
      "type": "object",
      "title": "Empty Schema"
    }
  }
}

在测试中,我看到了正确的Ogg二进制文件: aws api gateway test polly

当我使用不正确的Accept标头卷曲该端点时,我得到的是base64答案,但是当我设置正确的Accept: audio/ogg时,我在CloudWatch中得到500条错误消息:Execution failed due to configuration error: Unable to transform response

这个问题与我的previous one有关。

0 个答案:

没有答案