Django Review - Get the request parameters in several ways

  1. Path parameters
  2. The query string: request.GET (dictionary)
  3. Request body (form type): request.POST (dictionary)
  4. Request body (non-form type): request.body (bytes)
  5. Request header: REQ uest.ME the TA
  6. Other common HttpRequest object properties

    • method: a string that represents the HTTP request method, commonly used values: 'GET', 'POST'.
    • user: user requested object.
    • path: a string that represents the full path of the requested page does not contain the domain name or parameter.
    • encoding: A string indicating a coding mode data submitted.
      • If None indicates that the default settings using the browser, typically utf-8.
      • This property is writable, you can modify it to access the form encoded data used by modifying, then any access to the property will use the new encoding value.
    • FILES: a similar object dictionary that contains all uploaded files.

Guess you like

Origin www.cnblogs.com/ycg-blog/p/12070490.html