Request#
- class requests_cache.models.request.CachedRequest(body=None, cookies=_Nothing.NOTHING, headers=_Nothing.NOTHING, method=None, url=None)[source]#
Bases:
RichMixin
A serializable dataclass that emulates
requests.PreparedResponse
- Parameters:
cookies (
RequestsCookieJar
) –headers (
CaseInsensitiveDict
) –method (
str
) –url (
str
) –body (bytes) –
-
cookies:
RequestsCookieJar
#
- classmethod from_request(original_request)[source]#
Create a CachedRequest based on an original request object
- Parameters:
original_request (
PreparedRequest
) –- Return type:
-
headers:
CaseInsensitiveDict
#
- property path_url#