'Close the connection to server.
If available, return a http_client.HTTPResponse object.
Closing the connection involves sending the
Transfer-Encoding terminating bytes.'

def close(self):

    self._reset_retries()
    self._closed = True
    try:
        self._conn.send('\r\n0\r\n\r\n'.encode('utf-8'))
    except http_client.socket.error:
        return ''
    return self._getresponse()
