Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3341 มุมมอง

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


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ธ.ค. 22
3617
How to make sign up menu in website? แก้ไขแล้ว
2
เม.ย. 20
4540
1
เม.ย. 20
3489
2
ก.ย. 19
9077
2
มิ.ย. 19
5586