def url_with_resources(base_url, resources=None):
    """Creates URL using given parameters.

    Args
    -----
        base_url (str): Base url, example http://somehost
        resources (list[str], optional): Resource name. Defaults to None.

    Returns
    -------
        Formatted URL to use with http apis.
    """
    if resources is None:
        return base_url
    else:
        return "{}/{}".format(base_url.rstrip('/'), "/".join(resources))