summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-09-05 13:21:32 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-09-06 17:39:15 -0500
commit8c05674c426298da7cd8a333c2dfce53151e041f (patch)
treee9bf7b6eb2a105ae6843cf1d74503aa95e0d964c /docs
parent7ed1b4dffdd2254a6c319f23bab43df3f6fad91e (diff)
downloadrequests-cache-8c05674c426298da7cd8a333c2dfce53151e041f.tar.gz
Alias/rename 'include_get_headers' to 'match_headers' for clarity (backwards-compatibile)
Diffstat (limited to 'docs')
-rw-r--r--docs/user_guide/matching.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/user_guide/matching.md b/docs/user_guide/matching.md
index 9670be2..5756161 100644
--- a/docs/user_guide/matching.md
+++ b/docs/user_guide/matching.md
@@ -8,9 +8,9 @@ parameters, or create your own custom request matcher.
## Matching Request Headers
In some cases, different headers may result in different response data, so you may want to cache
-them separately. To enable this, use `include_get_headers`:
+them separately. To enable this, use `match_headers`:
```python
->>> session = CachedSession(include_get_headers=True)
+>>> session = CachedSession(match_headers=True)
>>> # Both of these requests will be sent and cached separately
>>> session.get('http://httpbin.org/headers', {'Accept': 'text/plain'})
>>> session.get('http://httpbin.org/headers', {'Accept': 'application/json'})
@@ -45,9 +45,9 @@ This also applies to parameters in a JSON-formatted request body:
**Request Headers:**
-As well as headers, if `include_get_headers` is also used:
+As well as headers, if `match_headers` is also used:
```python
->>> session = CachedSession(ignored_parameters=['auth-token'], include_get_headers=True)
+>>> session = CachedSession(ignored_parameters=['auth-token'], match_headers=True)
>>> session.get('http://httpbin.org/get', headers={'auth-token': '2F63E5DF4F44'})
>>> r = session.get('http://httpbin.org/get', headers={'auth-token': 'D9FAEB3449D3'})
>>> assert r.from_cache is True