- Path parameters
- The query string: request.GET (dictionary)
- Request body (form type): request.POST (dictionary)
- Request body (non-form type): request.body (bytes)
- Request header: REQ uest.ME the TA
-
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.
Django Review - Get the request parameters in several ways
Guess you like
Origin www.cnblogs.com/ycg-blog/p/12070490.html
Recommended
Ranking