我尝试通过aws聊天机器人为Slack调用lambda,如下所示:
@aws lambda invoke --function-name lambda-identifier --payload {"key":"val"}
但是失败了:
!Could not parse request body into json: Unexpected character ('“' (code 8220 / 0x201c)): was expecting double-quote to start field name
at [Source: (byte[])"{“key”:“val”}"; line: 1, column: 5] (Service: AWSLambda; Status Code: 400; Error Code: InvalidRequestContentException; Request ID: 13724903-b15f-48e6-bc1a-9c6f9386baf4; Proxy: null)
我认为发生这种情况是因为Slack将简单的引号"
转换为优雅的引号“
。但是我不知道如何防止这种行为。