Android Volley gives me 400 error

后端 未结 12 2133
借酒劲吻你
借酒劲吻你 2020-12-11 00:28

I\'m trying to make a POST request to my API and it works in Postman (I get a valid JSON object), but not using Volley. With the follo

12条回答
  •  不思量自难忘°
    2020-12-11 01:16

    I have find a solution if you are using postman for hitting the api and your api have defined serializer field like skill = serializers.JSONField() then that type of error occurred-

    Solution For POSTMAN- you just add binary=True inside JSONField ex- skill = serializers.JSONField(binary=True)

    Solution for Android or other client then- you just remove binary=True inside JSONField ex- skill = serializers.JSONField()

提交回复
热议问题