in cassette/http_connection.py [0:0]
def getresponse(self, buffering=False):
"""Return HTTP response."""
if buffering:
raise NotImplemented("buffering not supported by cassette.")
if hasattr(self, "_response"):
return self._response
lib = self._cassette_library
response = self._baseclass.getresponse(self)
# If we were just returning the response here, the file
# descriptor would be at the end of the file, and read() would
# return nothing.
response = lib.add_response(self._cassette_name, response)
return response