Retrieve the FEDERATION_SERVER config from a domain's stellar.toml.

    :param str domain: The domain the .toml file is hosted at.
    :param bool allow_http: Specifies whether the request should go over plain
        HTTP vs HTTPS. Note it is recommend that you *always* use HTTPS.
    :return str: The FEDERATION_SERVER url.

def get_federation_service(domain, allow_http=False):
    """Retrieve the FEDERATION_SERVER config from a domain's stellar.toml.

    :param str domain: The domain the .toml file is hosted at.
    :param bool allow_http: Specifies whether the request should go over plain
        HTTP vs HTTPS. Note it is recommend that you *always* use HTTPS.
    :return str: The FEDERATION_SERVER url.

    """
    st = get_stellar_toml(domain, allow_http)
    if not st:
        return None
    return st.get('FEDERATION_SERVER')