Skip to content

Commit

Permalink
Reverse the order of conversion examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Gallaecio committed Jul 15, 2024
1 parent 32a819c commit db4f1d2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,17 @@ software.
:class:`~form2request.Request` also provides conversion methods for common use
cases:

- :class:`~form2request.Request.to_poet`, for :doc:`web-poet 0.2.0+
<poet:index>`:
- :class:`~form2request.Request.to_scrapy`, for :doc:`Scrapy 1.1.0+
<scrapy:index>`:

>>> request_data.to_poet()
HttpRequest(url=RequestUrl('https://example.com?foo=bar'), method='GET', headers=<HttpRequestHeaders()>, body=b'')
>>> request_data.to_scrapy(callback=self.parse) # doctest: +SKIP
<GET https://example.com?foo=bar>

- :class:`~form2request.Request.to_requests`, for :doc:`requests 1.0.0+
<requests:index>` (see an example :ref:`above <requests-example>`).

- :class:`~form2request.Request.to_scrapy`, for :doc:`Scrapy 1.1.0+
<scrapy:index>`:
- :class:`~form2request.Request.to_poet`, for :doc:`web-poet 0.2.0+
<poet:index>`:

>>> request_data.to_scrapy(callback=self.parse) # doctest: +SKIP
<GET https://example.com?foo=bar>
>>> request_data.to_poet()
HttpRequest(url=RequestUrl('https://example.com?foo=bar'), method='GET', headers=<HttpRequestHeaders()>, body=b'')

0 comments on commit db4f1d2

Please sign in to comment.