

def request(self, host, handler, request_body, encoding, verbose=0):
    h = self.make_connection(host)
    if verbose:
        h.set_debuglevel(1)
    self.send_request(r, handler, request_body)
    if (not PY3):
        self.send_host(h, host)
    self.send_user_agent(h)
    self.send_content(h, request_body)
    try:
        (errcode, errmsg, headers) = h.getreply()
        r = h.getfile()
    except AttributeError:
        r = h.getresponse()
        errcode = r.status
        errmsg = r.reason
        headers = r.getheaders()
    if (errcode != 200):
        response = r.read()
        raise ProtocolError((host + handler), errcode, errmsg, headers, response)
    self.verbose = verbose
    try:
        sock = h._conn.sock
    except AttributeError:
        sock = None
    return self._parse_response(r, sock, encoding)

dataset/ETHPy150Open circuits/circuits/tests/web/jsonrpclib.py Transport.request/VarMisuse@48/56 `h`->`r`