Skip to content

API response format #18

@yifeili98

Description

@yifeili98

The previous version of API is a bit chaotic on reponse bodies, so now I have made the function generate_response in src/utils.py, which takes in data, code, and an optional header. This function will use json.dumps to put the data parameter into the content section of the response body and give the response a corresponding status code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions