mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
Make response.raw.stream() work for urllib3 v2
This commit is contained in:
@@ -170,6 +170,13 @@ class VCRHTTPResponse(HTTPResponse):
|
|||||||
def drain_conn(self):
|
def drain_conn(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def stream(self, amt=65536, decode_content=None):
|
||||||
|
while True:
|
||||||
|
b = self._content.read(amt)
|
||||||
|
yield b
|
||||||
|
if not b:
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
class VCRConnection:
|
class VCRConnection:
|
||||||
# A reference to the cassette that's currently being patched in
|
# A reference to the cassette that's currently being patched in
|
||||||
|
|||||||
Reference in New Issue
Block a user