Skip to content

Commit 9b5d30c

Browse files
committed
python-ecosys/urequests: cache standard responses
-read and cache data for standard (not stream) responses to mimic the behavior of the original requests package
1 parent 25ebe4a commit 9b5d30c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python-ecosys/urequests/urequests.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ def request(method, url, data=None, json=None, headers={}, stream=None):
119119

120120
if stream:
121121
resp.raw.setblocking(False)
122+
else:
123+
resp.content
122124

123125
return resp
124126

0 commit comments

Comments
 (0)