[英]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.