diff --git a/docs/topics/request-response.rst b/docs/topics/request-response.rst index f83ef98b7..0aaf7d5d6 100644 --- a/docs/topics/request-response.rst +++ b/docs/topics/request-response.rst @@ -24,7 +24,7 @@ below in :ref:`topics-request-response-ref-request-subclasses` and Request objects =============== -.. class:: Request(url[, method='GET', body, headers, cookies, meta, encoding='utf-8', priority=0, dont_filter=False, callback, errback]) +.. class:: Request(url[, callback, method='GET', headers, body, cookies, meta, encoding='utf-8', priority=0, dont_filter=False, errback]) A :class:`Request` object represents an HTTP request, which is usually generated in the Spider and executed by the Downloader, and thus generating @@ -33,6 +33,15 @@ Request objects :param url: the URL of this request :type url: string + :param callback: the function that will be called with the response of this + request (once its downloaded) as its first parameter. For more information + see :ref:`topics-request-response-ref-request-callback-arguments` below. + If a Request doesn't specify a callback, the spider's + :meth:`~scrapy.spider.BaseSpider.parse` method will be used. + Note that if exceptions are raised during processing, errback is called instead. + + :type callback: callable + :param method: the HTTP method of this request. Defaults to ``'GET'``. :type method: string @@ -101,13 +110,6 @@ Request objects care, or you will get into crawling loops. Default to ``False``. :type dont_filter: boolean - :param callback: the function that will be called with the response of this - request (once its downloaded) as its first parameter. For more information - see :ref:`topics-request-response-ref-request-callback-arguments` below. - If a Request doesn't specify a callback, the spider's - :meth:`~scrapy.spider.BaseSpider.parse` method will be used. - :type callback: callable - :param errback: a function that will be called if any exception was raised while processing the request. This includes pages that failed with 404 HTTP errors and such. It receives a `Twisted Failure`_ instance