def _service_url_from_hostport(secure, host, port):
    """ Create appropriate service service URL.
        Note: Currently, https does not work for lcoalhost. Though it does work
                work on staging.
    """
    if secure:
        protocol = 'https://'
    else:
        protocol = 'http://'
    return ''.join([protocol, host, ':', str(port), '/_rpc/v1/reports/binary'])
