def beacon(config):
    # Important!!!
    # Although this toy example makes an HTTP call
    # to get beacon information
    # please be advised that doing CPU or IO intensive
    # operations in this method will cause the beacon loop
    # to block.
    beacon_url = '{0}{1}'.format(__opts__['proxy']['url'],
                                 config['endpoint'])
    ret = salt.utils.http.query(beacon_url,
                                decode_type='json',
                                decode=True)
    return [ret['dict']]
extract host and port from an URL string
dataset/ETHPy150Open saltstack/salt/salt/beacons/proxy_example.py/beacon--crossover with--dataset/ETHPy150Open pyserial/pyserial/serial/urlhandler/protocol_socket.py/Serial.from_url