summaryrefslogtreecommitdiff
path: root/requests_cache/session.py
diff options
context:
space:
mode:
authorJordan Cook <jordan.cook@pioneer.com>2021-09-19 21:06:03 -0500
committerJordan Cook <jordan.cook@pioneer.com>2021-09-20 23:33:30 -0500
commitb3fc1f042e2deebcc62c1a074a02c0f90ab406ca (patch)
tree505b517e76d06b736966213f7f6e52075d9f463a /requests_cache/session.py
parent5605db4a84c4ee15f4406ea872aa650e31f3348f (diff)
downloadrequests-cache-b3fc1f042e2deebcc62c1a074a02c0f90ab406ca.tar.gz
Reorganize & improve request normalization functions:
* Handle all normalization in `cache_keys` module, get rid of `normalize_dict()` function used in `CachedSession` * Reorganize `cache_keys` helper functions into the following: * `normalize_request()` * `normalize_url()` * `normalize_headers()` * `normalize_params()` * `normalize_body()` * `normalize_json_body()` * `redact_response()`
Diffstat (limited to 'requests_cache/session.py')
-rw-r--r--requests_cache/session.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/requests_cache/session.py b/requests_cache/session.py
index a60c93e..bc6ffd5 100644
--- a/requests_cache/session.py
+++ b/requests_cache/session.py
@@ -26,9 +26,9 @@ from urllib3 import filepost
from . import get_valid_kwargs
from .backends import BackendSpecifier, init_backend
from .cache_control import CacheActions, ExpirationTime, get_expiration_seconds
-from .cache_keys import normalize_dict
from .models import AnyResponse, CachedResponse, set_response_defaults
+__all__ = ['ALL_METHODS', 'CachedSession', 'CacheMixin']
ALL_METHODS = ['GET', 'HEAD', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
FILTER_FN = Callable[[AnyResponse], bool]
@@ -119,9 +119,9 @@ class CacheMixin(MIXIN_BASE):
return super().request(
method,
url,
- params=normalize_dict(params),
- data=normalize_dict(data),
- json=normalize_dict(json),
+ params=params,
+ data=data,
+ json=json,
headers=headers,
**kwargs,
)