Azure Function template is invoked but never responds

Di Rienzo, Francesco 0 Reputation points

Hello, Thanks a lot in advance, I have followed this guide ( to create an azure function in VS Code using Java and Maven.

the code is the following:

User's image

the host.json is the following:
User's image

the local.settings.json is the following:

User's image

then I am able to start the azure function locally with:

mvn azure-functions:run -f "c:\Users\francesco.di.rienzo\Desktop\Azure f1\pom.xml".

and the output in the terminal is the following:


        HttpExample: [GET,POST] http://localhost:7071/api/HttpExample

For detailed output, run func with --verbose flag.
[2023-05-02T16:09:12.497Z] Worker process started and initialized.
[2023-05-02T16:09:15.362Z] Host lock lease acquired by instance ID '000000000000000000000000F10D2648'.

but when I copy that link in the browser I don't see anything, the page just keeps loading, but in the terminal, in VS Code, I can see that there is a new log:
Executing 'Functions.HttpExample' (Reason='This function was programmatically called via the host APIs.', Id=5aadbadf-3198-4532-8fdb-f704637233b3)

and that's it.

When I run mvn test -f "c:\Users\francesco.di.rienzo\Desktop\Azure f1\pom.xml" I can see in the terminal that those two loggers are printed:


context.getLogger().info("Java HTTP trigger processed a request.");
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
3,719 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lohith Goudagere Nagaraj 0 Reputation points Microsoft Employee

    when you pasted the link in the browser, did you paste it as "http://localhost:7071/api/HttpExample" or as "http://localhost:7071/api/HttpExample?name=Azure" ??

    According to your code - you are looking for either a querystring property called name or data in body. if you dont pass anything your code should through bad request exception.

    trying passing the name querystring property and check.