Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
3312 Visninger

Hi there, I got some format issue on json respone. I would like to give some error message on my controller. below is my code and it is sending 400 response but I tried with Postman and there is no specific message.


if citizen_chk != True:
       return Response(json.dumps({"err":"Login only for citizen"}),content_type='application/json;charset=utf-8',status=400)


I got the response in postman as below,

{"jsonrpc": "2.0", "id": null, "result": " Response 53 bytes [400 BAD REQUEST] "}


May I know how to show my message " Login only for citizen" ?


Thanks


Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
3
dec. 22
3613
2
apr. 20
4527
1
apr. 20
3465
2
sep. 19
9025
2
jun. 19
5576