http.HttpRequest.readline()

HttpRequest.readline() [source]

http.HttpRequest.scheme

HttpRequest.scheme A string representing the scheme of the request (http or https usually).

http.HttpRequest.POST

HttpRequest.POST A dictionary-like object containing all given HTTP POST parameters, providing that the request contains form data. See the QueryDict documentation below. If you need to access raw or non-form data posted in the request, access this through the HttpRequest.body attribute instead. It’s possible that a request can come in via POST with an empty POST dictionary – if, say, a form is requested via the POST HTTP method but does not include form data. Therefore, you shouldn’t use if

http.HttpRequest.path_info

HttpRequest.path_info Under some Web server configurations, the portion of the URL after the host name is split up into a script prefix portion and a path info portion. The path_info attribute always contains the path info portion of the path, no matter what Web server is being used. Using this instead of path can make your code easier to move between test and deployment servers. For example, if the WSGIScriptAlias for your application is set to "/minfo", then path might be "/minfo/music/ban

http.HttpRequest.path

HttpRequest.path A string representing the full path to the requested page, not including the scheme or domain. Example: "/music/bands/the_beatles/"

http.HttpRequest.read()

HttpRequest.read(size=None) [source]

http.HttpRequest.method

HttpRequest.method A string representing the HTTP method used in the request. This is guaranteed to be uppercase. Example: if request.method == 'GET': do_something() elif request.method == 'POST': do_something_else()

http.HttpRequest.META

HttpRequest.META A standard Python dictionary containing all available HTTP headers. Available headers depend on the client and server, but here are some examples: CONTENT_LENGTH – The length of the request body (as a string). CONTENT_TYPE – The MIME type of the request body. HTTP_ACCEPT – Acceptable content types for the response. HTTP_ACCEPT_ENCODING – Acceptable encodings for the response. HTTP_ACCEPT_LANGUAGE – Acceptable languages for the response. HTTP_HOST – The HTTP Host header

http.HttpRequest.is_ajax()

HttpRequest.is_ajax() [source] Returns True if the request was made via an XMLHttpRequest, by checking the HTTP_X_REQUESTED_WITH header for the string 'XMLHttpRequest'. Most modern JavaScript libraries send this header. If you write your own XMLHttpRequest call (on the browser side), you’ll have to set this header manually if you want is_ajax() to work. If a response varies on whether or not it’s requested via AJAX and you are using some form of caching like Django’s cache middleware, you sh

http.HttpRequest.is_secure()

HttpRequest.is_secure() [source] Returns True if the request is secure; that is, if it was made with HTTPS.