How to create python controller/Module to return function with status code,status and data

Viewed 21

My expected output is:

i want this type of output

My source code to return JSON:

def return_fun(status,code,content):
    
    return jsonify({"Status":status,"Response":code,"data":content})

How do I automatically fetch the status code and return it, so I get output like first image?

0 Answers
Related