def request_api(request, url_or_view_name, method='GET', data=None, params=None, verify=False):
    """ Make a request to API internally.
        Use 'request.user' for authentication.
        Return a JSON response.
    """

    token = Token.objects.get(user=request.user)
    method = getattr(requests, method.lower())
    if url_or_view_name.startswith('http'):
        url = url_or_view_name
    else:
        url = request.build_absolute_uri(reverse(url_or_view_name))

    response = method(url, headers={'Authorization': 'Token %s' + token.key}, data=data, params=params, verify=verify)
    setattr(response, 'total', int(response.headers.get('X-Result-Count', 0)))
    return response
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/core/utils.py/request_api/operator `%` -> `+`