Skip to content

[Bug]: GET requests accept a request body #1404

@severussundar

Description

@severussundar

What happened?

When a GET request is executed by including a request body, the request succeeds.

Request URI: https://localhost:5001/api/Book/id/1
Request Body:

{
    "title": "Awesome book",
    "publisher_id": 1234
}

Response:

{
    "value": [
        {
            "id": 1,
            "title": "Awesome book",
            "publisher_id": 1234
        }
    ]
}

The data entered in the request body is ignored. While, the right response is returned, it might be worth returning a bad request (HTTP 400) response as the request body is irrelevant for GET requests.

Similar behavior happens for list operation as well

image

Version

0.5.35

What database are you using?

Azure SQL

What hosting model are you using?

Local (including CLI)

Which API approach are you accessing DAB through?

REST

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions