Fix the http trigger signatures in tests, samples and docs. Upgrade the azure maven version

Resolves #1088
This commit is contained in:
Christian Tzolov
2023-10-30 14:34:17 +01:00
committed by Oleg Zhurakousky
parent c3cb561a7b
commit 9ceb4f64d2
5 changed files with 23 additions and 11 deletions

View File

@@ -20,6 +20,7 @@ import java.util.Optional;
import java.util.function.Function;
import com.microsoft.azure.functions.ExecutionContext;
import com.microsoft.azure.functions.HttpMethod;
import com.microsoft.azure.functions.HttpRequestMessage;
import com.microsoft.azure.functions.annotation.AuthorizationLevel;
import com.microsoft.azure.functions.annotation.FunctionName;
@@ -80,7 +81,8 @@ public class AzureFunctionInstanceInjectorTest {
@FunctionName("hello")
public String execute(
@HttpTrigger(name = "req", authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
@HttpTrigger(name = "req", methods = { HttpMethod.GET,
HttpMethod.POST }, authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
ExecutionContext context) {
Message<String> enhancedRequest = (Message<String>) AzureFunctionUtil.enhanceInputIfNecessary(