Skip to content

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

Open
@SalatielBairros

Description

@SalatielBairros

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions