using "request" variable in python web program
gagsl-py2 at yahoo.com.ar
Mon Oct 22 17:08:10 CEST 2007
En Mon, 22 Oct 2007 05:34:55 -0300, sami <sami.jan at gmail.com> escribi�:
> Thanks again Paul - now I can see that the "request" object is a
> string of name/value pairs that occurs after a "?" in a url e.g.
> url.com/index.cgi?name=sami&lang=python - is that correct? Googling
> for this information is useless since the word "request" is so common
> on the www
Not exactly - this is the "query string" part of the URI.
Request and Response are the two messages defined by the HTTP protocol.
When you type a URL or click on a link or press a button in a page, your
browser builds the appropiate Request message and sends it to the server.
After processing, the server emits the Response message, and the browser
displays it or otherwise processes the response.
The request and response objects that most web frameworks expose are
abstractions of these two HTTP messages.
The bloody details are specified in RFC 2616 HTTP/1.1
<http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html>, but you can find
plenty of less technical descriptions. At least a basic understanding of
how the HTTP protocol works is required to build a web application.
More information about the Python-list