From f28c605091cb692da7d601b0d926830437c9378c Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Wed, 21 Feb 2024 14:55:51 +0200 Subject: [PATCH] Allow all HTTP methods in Azure functions Fixes: #37065 (cherry picked from commit 9b8cae729f8f3a91658ef4d7cdeff3c87a8b1ab7) --- .../quarkus/azure/functions/resteasy/runtime/Function.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/extensions/azure-functions-http/runtime/src/main/java/io/quarkus/azure/functions/resteasy/runtime/Function.java b/extensions/azure-functions-http/runtime/src/main/java/io/quarkus/azure/functions/resteasy/runtime/Function.java index dde4d70e945c0..3bfb8bdd2684b 100644 --- a/extensions/azure-functions-http/runtime/src/main/java/io/quarkus/azure/functions/resteasy/runtime/Function.java +++ b/extensions/azure-functions-http/runtime/src/main/java/io/quarkus/azure/functions/resteasy/runtime/Function.java @@ -3,7 +3,6 @@ import java.util.Optional; import com.microsoft.azure.functions.ExecutionContext; -import com.microsoft.azure.functions.HttpMethod; import com.microsoft.azure.functions.HttpRequestMessage; import com.microsoft.azure.functions.HttpResponseMessage; import com.microsoft.azure.functions.annotation.AuthorizationLevel; @@ -16,10 +15,8 @@ public class Function extends BaseFunction { @FunctionName(QUARKUS_HTTP) public HttpResponseMessage run( - @HttpTrigger(name = "req", dataType = "binary", methods = { HttpMethod.GET, HttpMethod.HEAD, HttpMethod.POST, - HttpMethod.PUT, - HttpMethod.OPTIONS }, route = "{*path}", authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage> request, - final ExecutionContext context) { + @HttpTrigger(name = "req", dataType = "binary", route = "{*path}", authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage> request, + ExecutionContext context) { return dispatch(request); }