Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

[doc] cb_kwargs contract

Eugenio Lacuesta2061f2a382b1
diff --git a/docs/topics/contracts.rst b/docs/topics/contracts.rst
index 957761b76..62f9a743b 100644
--- a/docs/topics/contracts.rst
+++ b/docs/topics/contracts.rst
@@ -35,12 +35,20 @@ This callback is tested using three built-in contracts:
.. class:: UrlContract
- This contract (``@url``) sets the sample url used when checking other
+ This contract (``@url``) sets the sample URL used when checking other
contract conditions for this spider. This contract is mandatory. All
callbacks lacking this contract are ignored when running the checks::
@url url
+.. class:: CallbackKeywordArgumentsContract
+
+ This contract (``@cb_kwargs``) sets the :attr:`cb_kwargs <scrapy.http.Request.cb_kwargs>`
+ attribute for the sample request. It must be a valid JSON dictionary.
+ ::
+
+ @cb_kwargs {"arg1": "value1", "arg2": "value2", ...}
+
.. class:: ReturnsContract
This contract (``@returns``) sets lower and upper bounds for the items and