gpt4 book ai didi

c# - Azure持久函数 "terminatePostUri"在触发时给出404

转载 作者:行者123 更新时间:2023-12-02 23:15:54 28 4
gpt4 key购买 nike

我正在创建一个 Azure Durable 功能应用程序,其中编排器运行一段时间,但我需要一个选项来取消编排器(如果需要)。我尝试使用 Postman 的“terminatePostUri”,但它给了我一个 404 响应。

其他实例管理 uri(例如 statusQueryGetUri)正在按预期工作。

这是我的终止函数的代码片段。

[FunctionName("klaviyo_terminate_instance")]
public static Task Run([DurableClient(TaskHub = "%KlaviyoTaskHub%")] IDurableOrchestrationClient client,
[QueueTrigger("terminate-queue")] string instanceId)
{
return client.TerminateAsync(instanceId, "Called for terminate instance");
}

这是 postman 的回复。

enter image description here

最佳答案

因此,显然终止 uri 可以作为 POST 请求(而不是 GET)工作,尽管没有任何有效负载。不知道这是什么原因。

来源:https://learn.microsoft.com/en-us/azure/azure-functions/durable/durable-functions-http-api

关于c# - Azure持久函数 "terminatePostUri"在触发时给出404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67056429/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com