Skip to content

Commit

Permalink
Allow all HTTP methods in Azure functions
Browse files Browse the repository at this point in the history
Fixes: #37065
(cherry picked from commit 9b8cae7)
  • Loading branch information
geoand authored and gsmet committed Feb 27, 2024
1 parent 7128d76 commit f28c605
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<Optional<String>> request,
final ExecutionContext context) {
@HttpTrigger(name = "req", dataType = "binary", route = "{*path}", authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
ExecutionContext context) {

return dispatch(request);
}
Expand Down

0 comments on commit f28c605

Please sign in to comment.