mirror of https://github.com/scrapy/scrapy.git
added FormRequest example
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40782
This commit is contained in:
parent
e25bfa5d88
commit
14ceca98bf
|
|
@ -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
|
||||
================
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue