Azure 函数预编译函数,HttpRequestMessage 未传递给函数

Azure functions pre-compiled function, HttpRequestMessage not being passed to function

我有以下 F# 函数签名和函数开头

let Run(req: HttpRequestMessage, log: TraceWriter) =     
    async {
        log.Info("HttpRequestMessage" + req.ToString())
    ...

当我执行我的函数并打印 req 的值时,我得到

HttpRequestMessageMethod: GET, RequestUri: '<null>', Version: 1.1, Content: 
<null>, Headers:{ }

下面是我的function.json文件

{
  "scriptFile": "../WonkTonkLib/wonktonkPostLib.dll",
  "entryPoint": "PutUser.Run",
  "bindings": [
    {
      "authLevel": "anonymous",
      "name": "req",
      "type": "httpTrigger",
      "direction": "in",
      "methods": [
        "post"
      ]
    },
    {
      "name": "res",
      "type": "http",
      "direction": "out"
    }
  ],
  "disabled": false
}

知道为什么我没有将请求消息传递给函数吗?感谢任何帮助。

请确保您的项目引用的是 System.Net.Http 4.1.1.0 而不是更高版本。

当前的工具和运行时都在更新以在没有该要求的情况下解决这个问题,但与此同时,确保您匹配该版本应该可以解决这个问题。