allow adapter to listen for additional http verbs

Signed-off-by: Oblio <oblio.leitch@vermont.gov>

Resolves #1271
This commit is contained in:
Oblio
2025-04-21 08:57:25 -04:00
committed by Oleg Zhurakousky
parent 8e20b798e0
commit c2bc8682f1

View File

@@ -126,8 +126,13 @@ public class AzureWebProxyInvoker implements FunctionInstanceInjector {
@FunctionName(AZURE_WEB_ADAPTER_NAME)
public HttpResponseMessage execute(
@HttpTrigger(name = "req", methods = { HttpMethod.GET,
HttpMethod.POST }, authLevel = AuthorizationLevel.ANONYMOUS, route = AZURE_WEB_ADAPTER_ROUTE) HttpRequestMessage<Optional<String>> request,
@HttpTrigger(name = "req", methods = {
HttpMethod.GET,
HttpMethod.POST,
HttpMethod.PUT,
HttpMethod.DELETE,
HttpMethod.PATCH
}, authLevel = AuthorizationLevel.ANONYMOUS, route = AZURE_WEB_ADAPTER_ROUTE) HttpRequestMessage<Optional<String>> request,
ExecutionContext context) {
context.getLogger().info("Request body is: " + request.getBody().orElse("[empty]"));