Skip to content

Commit

Permalink
shorturl-s3-lambda: mention HTTP method in response
Browse files Browse the repository at this point in the history
  • Loading branch information
agarciadom committed Dec 5, 2024
1 parent e7420ef commit f00f8d9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class FunctionRequestHandler extends MicronautRequestHandler<APIGatewayPr
public APIGatewayProxyResponseEvent execute(APIGatewayProxyRequestEvent input) {
APIGatewayProxyResponseEvent response = new APIGatewayProxyResponseEvent();
if (!"POST".equals(input.getHttpMethod())) {
setResponseText(response, "Invalid HTTP method. Valid HTTP methods are: [POST]");
setResponseText(response, String.format("Invalid HTTP method: %s. Valid HTTP methods are: [POST]", input.getHttpMethod()));
response.setStatusCode(400);
return response;
}
Expand Down

0 comments on commit f00f8d9

Please sign in to comment.