Skip to content

[HttpApi(LambdaHttpMethod.Get, "/add/{x}/{y}")] responding to POST #1498

Closed
@genifycom

Description

@genifycom

Describe the bug

Using the default project, the method annotated with [HttpApi(LambdaHttpMethod.Get, "/add/{x}/{y}")] is getting called when the API Gateway V2 HTTP API says "http": {
"method": "POST",
...}

Expected Behavior

The annotation LambdaHttpMethod.Get should only respond to a GET

Current Behavior

A debug breakpoint in the default annotations project was called with the Mock Lambda Test Tool and Example Request of API Gateway V2 HTTP API.

Noticed that the breakpoint was triggered when the V2 payload was for a POST.

Reproduction Steps

See current behavior

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

Amazon.Lambda.Annotations 0.13.2
Amazon.Lambda.APIGatewayEven 2.6.0
Amazon.Lambda.Core 2.1.0
Amazon.Lambda.Serialization 2.3.1

Targeted .NET Platform

.NET 6

Operating System and version

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions