added FormRequest example

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40782
This commit is contained in:
Pablo Hoffman 2009-01-27 12:10:49 +00:00
parent e25bfa5d88
commit 14ceca98bf
1 changed files with 7 additions and 0 deletions

View File

@ -137,6 +137,13 @@ The FormRequest class adds a new parameter to the constructor:
containing HTML Form data) which will be urlencoded and assigned to the body
of the request.
For example, if you want to simulate a HTTP Form POST in your spider which
sends a coupe of of key-values you would return a :class:`FormRequest` object
(from your spider) like this::
return [FormRequest(url="http://www.example.com/post/action",
formdata={'name': 'John Doe', age: '27'})]
Response objects
================