Django - Where are the params stored on a PUT/DELETE request?

前端 未结 7 1193
[愿得一人]
[愿得一人] 2020-11-30 00:17

I\'d like to follow the RESTful pattern for my new django project, and I\'d like to know where the parameters are when a PUT/DELETE request is made.

As far as I know

7条回答
  •  一个人的身影
    2020-11-30 00:55

    There was a problem that I couldn't solve how to parse multipart/form-data from request. QueryDict(request.body) did not help me.

    So, I've found a solution for me. I started using this:

    from django.http.multipartparser import MultiPartParser

    You can get data from request like:

    MultiPartParser(request.META, request, request.upload_handlers).parse()
    

提交回复
热议问题