Bot Framework Composer HTTP 请求错误
Bot Framework Composer HTTP request Error
我正在 Bot 框架 composer 中开发聊天机器人。在那里,我需要调用 Azure 逻辑应用程序 以 使用 bot framework composer 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框架composer Body
{
"account": {
"name": "Contoso",
"ID": "12345",
"address": {
"number": "1234",
"street": "Anywhere Street",
"city": "AnyTown",
"state": "AnyState",
"country": "USA",
"postalCode": "11111"
}
}
}
我相信问题已在您的错误响应中确定json 负载:
"message": "The HTTP method for this request is not valid: expected 'Post' and actual 'GET'."}}}
将您的 HTTP 方法更改为 POST
而不是 GET
,然后重试。
我正在 Bot 框架 composer 中开发聊天机器人。在那里,我需要调用 Azure 逻辑应用程序 以 使用 bot framework composer 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框架composer Body
{
"account": {
"name": "Contoso",
"ID": "12345",
"address": {
"number": "1234",
"street": "Anywhere Street",
"city": "AnyTown",
"state": "AnyState",
"country": "USA",
"postalCode": "11111"
}
}
}
我相信问题已在您的错误响应中确定json 负载:
"message": "The HTTP method for this request is not valid: expected 'Post' and actual 'GET'."}}}
将您的 HTTP 方法更改为 POST
而不是 GET
,然后重试。