Page 1 of 1

rest api - custom response

Posted: Thu Mar 23, 2023 12:43 am
by qqblog

can we customise the json response for error eg. field format error ?

if failed

{
    "success": false,
    "version": "19.0.0",
    "error": {
        "code": 202
 "description": "xxxxxxxx"
    }
}

if success

{
    "success": true,
    "version": "19.0.0",
    "cars": {
        "ID": 16,
        "Trademark": 1,
        ...
    }
}

Re: rest api - custom response

Posted: Thu Mar 23, 2023 10:06 am
by arbei