Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET request with @online.route requires a body #623

Open
SalatielBairros opened this issue Feb 16, 2024 · 1 comment
Open

GET request with @online.route requires a body #623

SalatielBairros opened this issue Feb 16, 2024 · 1 comment

Comments

@SalatielBairros
Copy link

Current problem

When I created an endpoint like:

@online.route("hello_world")
def hello_world():
    message = {
        'message': 'Hello World'
    }
    return message

And called it without body, the response was e 400 bad request:

image

This happens because the following line:

local.request = OnlineRequest(values=flask_request.values, json=flask_request.json)

It calls flask.request.json():
image

If I add a body to the request, it works normally:

image

What's expected

When making a GET call to an endpoint, body should not be required.

Copy link

mergeable bot commented Feb 16, 2024

This issue should be labeled at least with kind and priority labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant