@Bean of type Function
public class FooHandler extends AzureSpringBootRequestHandler<Foo, Bar> {
@FunctionName("uppercase")
- public Bar execute(
- @HttpTrigger(name = "req", methods = { HttpMethod.GET,
- HttpMethod.POST }, authLevel = AuthorizationLevel.ANONYMOUS)
- Foo foo,
- ExecutionContext context) {
- return handleRequest(foo, context);
+ public Bar execute(@HttpTrigger(name = "req", methods = {HttpMethod.GET,
+ HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<Foo>> request,
+ ExecutionContext context) {
+ return handleRequest(request.getBody().get(), context);
}
}
@@ -257,7 +255,7 @@ the cloud platform provider.
-and curl -H "Content-Type: text/plain" localhost:8080/function -d '{"value": "hello foobar"}'.
+and curl -H "Content-Type: text/plain" localhost:8080/api/uppercase -d '{"value": "hello foobar"}'.
You will need the az CLI app (see https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-java-maven for more detail). To deploy the function on Azure runtime:
diff --git a/reference/html/azure-readme.html b/reference/html/azure-readme.html
index a7c3d632b..6a9c98ee4 100644
--- a/reference/html/azure-readme.html
+++ b/reference/html/azure-readme.html
@@ -128,12 +128,10 @@ You can write an app with a single @Bean of type Function
public class FooHandler extends AzureSpringBootRequestHandler<Foo, Bar> {
@FunctionName("uppercase")
- public Bar execute(
- @HttpTrigger(name = "req", methods = { HttpMethod.GET,
- HttpMethod.POST }, authLevel = AuthorizationLevel.ANONYMOUS)
- Foo foo,
- ExecutionContext context) {
- return handleRequest(foo, context);
+ public Bar execute(@HttpTrigger(name = "req", methods = {HttpMethod.GET,
+ HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<Foo>> request,
+ ExecutionContext context) {
+ return handleRequest(request.getBody().get(), context);
}
}
@@ -266,7 +264,7 @@ the cloud platform provider.
-and curl -H "Content-Type: text/plain" localhost:8080/function -d '{"value": "hello foobar"}'.
+and curl -H "Content-Type: text/plain" localhost:8080/api/uppercase -d '{"value": "hello foobar"}'.
You will need the az CLI app (see https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-java-maven for more detail). To deploy the function on Azure runtime:
diff --git a/reference/html/azure.html b/reference/html/azure.html
index 70cb1ace4..ab9bbdca8 100644
--- a/reference/html/azure.html
+++ b/reference/html/azure.html
@@ -129,12 +129,10 @@ You can write an app with a single @Bean of type Function
public class FooHandler extends AzureSpringBootRequestHandler<Foo, Bar> {
@FunctionName("uppercase")
- public Bar execute(
- @HttpTrigger(name = "req", methods = { HttpMethod.GET,
- HttpMethod.POST }, authLevel = AuthorizationLevel.ANONYMOUS)
- Foo foo,
- ExecutionContext context) {
- return handleRequest(foo, context);
+ public Bar execute(@HttpTrigger(name = "req", methods = {HttpMethod.GET,
+ HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<Foo>> request,
+ ExecutionContext context) {
+ return handleRequest(request.getBody().get(), context);
}
}
@@ -267,7 +265,7 @@ the cloud platform provider.
-and curl -H "Content-Type: text/plain" localhost:8080/function -d '{"value": "hello foobar"}'.
+and curl -H "Content-Type: text/plain" localhost:8080/api/uppercase -d '{"value": "hello foobar"}'.
You will need the az CLI app (see https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-java-maven for more detail). To deploy the function on Azure runtime:
diff --git a/reference/html/spring-cloud-function.html b/reference/html/spring-cloud-function.html
index 3ddacda0d..3524d932f 100644
--- a/reference/html/spring-cloud-function.html
+++ b/reference/html/spring-cloud-function.html
@@ -1384,12 +1384,10 @@ You can write an app with a single @Bean of type Function
public class FooHandler extends AzureSpringBootRequestHandler<Foo, Bar> {
@FunctionName("uppercase")
- public Bar execute(
- @HttpTrigger(name = "req", methods = { HttpMethod.GET,
- HttpMethod.POST }, authLevel = AuthorizationLevel.ANONYMOUS)
- Foo foo,
- ExecutionContext context) {
- return handleRequest(foo, context);
+ public Bar execute(@HttpTrigger(name = "req", methods = {HttpMethod.GET,
+ HttpMethod.POST}, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<Foo>> request,
+ ExecutionContext context) {
+ return handleRequest(request.getBody().get(), context);
}
}
@@ -1522,7 +1520,7 @@ the cloud platform provider.
-and curl -H "Content-Type: text/plain" localhost:8080/function -d '{"value": "hello foobar"}'.
+and curl -H "Content-Type: text/plain" localhost:8080/api/uppercase -d '{"value": "hello foobar"}'.
You will need the az CLI app (see https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-java-maven for more detail). To deploy the function on Azure runtime: