如果在C#中有一个简单的HTTP触发函数,它不会返回结果:
public static HttpResponseMessage Run(HttpRequestMessage req, TraceWriter log)
{
string jobId = req.Headers.GetValues("scheduler-jobid").FirstOrDefault();
string executionTime = req.Headers.GetValues("scheduler-expected-execution-time").FirstOrDefault();
return req.CreateResponse(HttpStatusCode.OK,new {
JobId = jobId,
ExecutionTime = executionTime}
);
}
我使用POSTMAN检查了HTTP标头是否设置正确,但只是在没有响应主体的情况下获得200 OK。