I created a node.js function with a HttpTrigger and the v4 programming model using azure func init / func new on windows 10.
When I start the function with the options --useHttps--cert and --password the function is exposed on https://localhost:7071
If I query it using Invoke-WebRequest or Invoke-WebMethod it works fine.
If I query it using Internet Explorer I get the following error :
System.Private.CoreLib: Exception while executing function: Functions.echo. System.Private.CoreLib: Result: Failure
Exception: Headers.append: ":method" is an invalid header name.
Stack: TypeError: Headers.append: ":method" is an invalid header name.
at webidl.errors.exception (D:\repro\node_modules\@azure\functions\node_modules\undici\lib\fetch\webidl.js:13:10)
at webidl.errors.invalidArgument (D:\repro\node_modules\@azure\functions\node_modules\undici\lib\fetch\webidl.js:29:24)
at appendHeader (D:\repro\node_modules\@azure\functions\node_modules\undici\lib\fetch\headers.js:89:25)
at fill (D:\repro\node_modules\@azure\functions\node_modules\undici\lib\fetch\headers.js:68:7)
at new Request (D:\repro\node_modules\@azure\functions\node_modules\undici\lib\fetch\request.js:441:9)
at new HttpRequest (D:\repro\node_modules\@azure\functions\dist\azure-functions.js:1694:20)
at fromRpcTypedData (D:\repro\node_modules\@azure\functions\dist\azure-functions.js:717:16)
at InvocationModel.<anonymous> (D:\repro\node_modules\@azure\functions\dist\azure-functions.js:196:73)
at Generator.next (<anonymous>)
at D:\repro\node_modules\@azure\functions\dist\azure-functions.js:121:71.
From what I understand it's due to undici refusing the HTTP2 specific header :method
I didn't find a way to circumvent the problem. Any help would be welcome.
I created a node.js function with a HttpTrigger and the v4 programming model using azure
func init
/func new
on windows 10.When I start the function with the options
--useHttps
--cert
and--password
the function is exposed on https://localhost:7071If I query it using
Invoke-WebRequest
orInvoke-WebMethod
it works fine.If I query it using Internet Explorer I get the following error :
From what I understand it's due to
undici
refusing the HTTP2 specific header:method
I didn't find a way to circumvent the problem. Any help would be welcome.
I also posted the issue here : https://github.com/Azure/azure-functions-core-tools/issues/3735