| 109 | Note that FormRequest calls escape_ajax on url (via Request._set_url). |
| 110 | """ |
| 111 | def __init__(self, url=None, callback=None, method=None, formdata=None, |
| 112 | body=None, **kwargs): |
| 113 | # First init FormRequest to get url, body and method |
| 114 | if formdata: |
| 115 | FormRequest.__init__( |
| 116 | self, url=url, method=method, formdata=formdata) |
| 117 | url, method, body = self.url, self.method, self.body |
| 118 | # Then pass all other kwargs to SplashRequest |
| 119 | SplashRequest.__init__( |
| 120 | self, url=url, callback=callback, method=method, body=body, |
| 121 | **kwargs) |