![](/img/trans.png)
[英]Azure Function and SharePoint webhook: not getting changes from SharePoint list
[英]Webhook callback getting unexpected response 301 from Azure Function
我創建了一個 Azure Function 並將其托管在 Azure 中。 它接受“post”和“get”請求,我可以在本地運行它,並在我 GET 或 POST 時獲取一些日志 output。
當我在 Azure 中托管它時,如果我執行 GET 或 POST,我可以獲得相同的 output,這是我所期望的(通過郵遞員)。
我正在使用第三方工具來回調我的 Azure Function URL。 發送此回調后,我在 Azure CLI 中沒有收到任何 output 日志。 它使用的地址與我在門戶中獲取 output 時使用的地址完全相同。
第三方工具說它得到了HTTP 301
響應。
當我可以從 Postman 發布/獲取相同地址並獲得 200 時,為什么回調會獲得 HTTP 301?
Function 代碼:
[FunctionName("AddressNotification")]
public static async Task<IActionResult> Run(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", "post", Route = null)] HttpRequest req,
ILogger log)
{
log.LogInformation($"Address Callback function hit from req: {req.Host.ToString()}");
var content = await new StreamReader(req.Body).ReadToEndAsync();
log.LogInformation($"Request body: {content}");
return new OkResult();
}
第三方工具說我收到了 301:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.