def getUrlTargetAndContent(url, size=None, headers=None, data=None, timeout=None):
    fd = getUrlFd(url, headers=headers, data=data, timeout=timeout)
    try:
        if size is None:
            text = fd.read()
        else:
            text = fd.read(size)
    except socket.timeout:
        raise Error(TIMED_OUT)
    target = fd.geturl()
    fd.close()
    return (target, text)
See more:
dataset/ETHPy150Open ProgVal/Limnoria/src/utils/web.py/getUrlTargetAndContent--crossover with--dataset/ETHPy150Open toloco/pyoanda/pyoanda/client.py/Client.create_order