def clean_url(url):
    """ Strips the ending / from a URL if it exists.

    Parameters
    ----------
    url : string
        HTTP URL

    Returns
    -------
    url : string
        URL that is stripped of an ending / if it existed
    """
    if url[-1] == '/':
        return url[:-1]
    
    return url