Skip to content

Body is a dict when it should be an object #3

@Stuart-Wilcox

Description

@Stuart-Wilcox

Using a content type of JSON, the body is a python dict, which means accessing attributes of the body incorrectly may result in a KeyError. It would be better if the body was either a modified dict, that instead of throwing KeyError would just return None, or else a custom body object where attributes could be accessed as object attributes; ie req.body.value instead of req.body['value'].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions