def METHOD_NAME(self, secure=False) -> HTTPResponse:
    conn_cls = HTTPSConnection if secure else HTTPConnection
    conn = conn_cls(self.server.server_address[0], self.server.server_port)
    resp = None
    try:
        conn.request("GET", "/", headers={"Connection": "close"})
        resp = conn.getresponse()
        return resp, resp.read()
    finally:
        if resp:
            resp.close()
        conn.close()