From fe5ef0a80a0008788e35c5b9d3c016e40ddf610f Mon Sep 17 00:00:00 2001 From: Aryan <1111aryantiwari@gmail.com> Date: Sun, 1 Oct 2023 11:47:51 +0530 Subject: [PATCH] Fixed the dont_merge_cookies example in docs --- docs/topics/request-response.rst | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/topics/request-response.rst b/docs/topics/request-response.rst index 41df51589..8f204fb13 100644 --- a/docs/topics/request-response.rst +++ b/docs/topics/request-response.rst @@ -115,21 +115,18 @@ Request objects cookies for that domain and will be sent again in future requests. That's the typical behaviour of any regular web browser. - To create a request that does not send stored cookies and does not - store received cookies, set the ``dont_merge_cookies`` key to ``True`` - in :attr:`request.meta `. - - Example of a request that sends manually-defined cookies and ignores - cookie storage: + Example of a request that sends manually-defined cookies: .. code-block:: python Request( url="http://www.example.com", cookies={"currency": "USD", "country": "UY"}, - meta={"dont_merge_cookies": True}, ) + It is recommended not to set the ``dont_merge_cookies`` key to ``True`` + in :attr:`request.meta ` as it causes custom cookies to be ignored. + For more info see :ref:`cookies-mw`. .. caution:: Cookies set via the ``Cookie`` header are not considered by the