Skip to content

Commit

Permalink
Explicitly set all HTTP methods for Azure Functions
Browse files Browse the repository at this point in the history
It appears that failure to do so results in the generated
metadata not automatically including them (as opposed to what
the javadoc of @HttpTrigger says)

Fixes: #39242
  • Loading branch information
geoand committed Mar 7, 2024
1 parent e91bab4 commit 73761f0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.quarkus.azure.functions.resteasy.runtime;

import static com.microsoft.azure.functions.HttpMethod.*;

import java.util.Optional;

import com.microsoft.azure.functions.ExecutionContext;
Expand All @@ -15,7 +17,9 @@ public class Function extends BaseFunction {

@FunctionName(QUARKUS_HTTP)
public HttpResponseMessage run(
@HttpTrigger(name = "req", dataType = "binary", route = "{*path}", authLevel = AuthorizationLevel.ANONYMOUS) HttpRequestMessage<Optional<String>> request,
@HttpTrigger(name = "req", dataType = "binary", route = "{*path}", authLevel = AuthorizationLevel.ANONYMOUS, methods = {
GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE,
PATCH }) HttpRequestMessage<Optional<String>> request,
ExecutionContext context) {

return dispatch(request);
Expand Down

0 comments on commit 73761f0

Please sign in to comment.