【发布时间】:2020-12-21 23:10:07
【问题描述】:
我为 Azure Function 使用站点编辑器。我修改了初始功能代码,现在是:
#r "Newtonsoft.Json"
using System.Net;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json;
public static async Task<IActionResult> Run(HttpRequest req, ILogger log)
{
string requestBody = await new StreamReader(req.Body).ReadToEndAsync();
log.LogInformation(requestBody);
return new OkObjectResult(requestBody);
}
然后使用输出参数$return向 Cosmos Db 添加一个输出
当我测试我的功能时,我得到 404,没有别的
有人遇到过这个问题吗?有什么办法?
【问题讨论】:
标签: azure azure-functions azure-cosmosdb