【发布时间】:2021-07-05 05:08:15
【问题描述】:
我正在 Bot framework composer 中开发聊天机器人。在那里,我需要调用 Azure 逻辑应用程序 来使用机器人框架编写器 HTTP 请求发送电子邮件。我确实需要配置但不起作用。请参阅附件了解更多详情。 更多详情请查看随附的屏幕截图。
错误代码
{“statusCode”: 400,
“reasonPhrase”: “Bad Request”,
“headers”: {
"Cache-Control": "no-cache",
"Pragma": "no-cache",
"x-ms-ratelimit-burst-remaining-workflow-reads": "19999",
"x-ms-ratelimit-remaining-workflow-download-contentsize": "1073741824",
"x-ms-ratelimit-time-remaining-directapirequests": "99999999",
"x-ms-request-id": "southeastasia:4b634b23-3f4f-4acc-9ac7-9ddf3b5534c5",
"Strict-Transport-Security": "max-age=31536000; includeSubDomains",
"Date": "Fri, 09 Apr 2021 12:29:03 GMT"},
“content”: {
"error": {
"code": "TriggerRequestMethodNotValid",
"message": "The HTTP method for this request is not valid: expected 'Post' and actual 'GET'."}}}
下图显示 Azure 逻辑应用中的请求正文 JSON 架构
{
"properties": {
"account": {
"properties": {
"ID": {
"type": "string"
},
"address": {
"properties": {
"city": {
"type": "string"
},
"country": {
"type": "string"
},
"number": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"state": {
"type": "string"
},
"street": {
"type": "string"
}
},
"type": "object"
},
"name": {
"type": "string"
}
},
"type": "object"
}
},
"type": "object"
}
下图为 Bot 框架编写器 Body
{
"account": {
"name": "Contoso",
"ID": "12345",
"address": {
"number": "1234",
"street": "Anywhere Street",
"city": "AnyTown",
"state": "AnyState",
"country": "USA",
"postalCode": "11111"
}
}
}
【问题讨论】:
标签: botframework azure-logic-apps bot-framework-composer