Get request body as string in Django

前端 未结 3 1653
旧时难觅i
旧时难觅i 2020-12-01 17:45

I\'m sending a POST request with JSON body to a Django server (fairly standard). On the server I need to decode this using json.loads().

The problem is

3条回答
  •  Happy的楠姐
    2020-12-01 18:41

    I believe that the other end from where you receive this request does not convert the data to JSON before sending the request. Either you have to convert the data to JSON before you send, or just try accessing request.body in your view.

提交回复
热议问题