import requests


def http_get(url, api_uri, token, **params):
    """
    Helper function to perform an http get, with optional parameters

    :param url: The url of the endpoint
    :param api_url: The URI of the specific api
    :param token: The access token
    :param params: kwargs for optional parameter to the http get
    :return: The full requests response
    """
    response = requests.get(
        url + '/' + api_uri, params=params,
        headers={'Authorization': 'JWT ' + token},
    )
    response.raise_for_status()
    return response