Request objects
REST framework introduces a Request
object that extends the regular HttpRequest
, and provides more flexible request parsing. The core functionality of the Request
object is the request.data
attribute, which is similar to request.POST
, but more useful for working with Web APIs.
request.POST # Only handles form data. Only works for 'POST' method.
request.data # Handles arbitrary data. Works for 'POST', 'PUT' and 'PATCH' methods.
当前内容版权归 Django REST 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Django REST .