I have an azure app function, very basic that runs well when deployed but locally, when I’m sending a post request it just get stuck and eventually the whole shuts down with the message shown below. When I comment out the line from azure.storage.blob import BlobServiceClient
, the whole works and a response is returned.
My code:
import azure.functions as func
from azure.storage.blob import BlobServiceClient
def main(req: func.HttpRequest) -> func.HttpResponse:
return func.HttpResponse(
body="response",
status_code=200
)
the function.json file:
{
"scriptFile": "__init__.py",
"bindings": [
{
"authLevel": "function",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": [
"post"
]
},
{
"type": "http",
"direction": "out",
"name": "$return"
}
]
}
The command to trigger:
curl -X POST http://localhost:7071/api/TestFunc -H "Content-Type:application/json" -v -o -
The command window gets stuck in this operation. The azure environment is started in a venv using func host start
.
The azure terminal shows: Executing 'Functions.TestFunc' (Reason='This function was programmatically called via the host APIs.
and nothing else after that.
Is there any more info that I can provide to help find the solution? Does someone know what I can do to solve this issue? Having to deploy everytime to test is annoying.