def _make_request(self, method, endpoint, **kwargs):
        """
        Do the actual request with supplied HTTP method
        :param method: HTTP method
        :param endpoint: DHIS2 API endpoint
        :param kwargs: keyword args
        :return: response if ok, RequestException if not
        """
        if isinstance(kwargs.get('file_type'), string_types):
            file_type = kwargs['file_type'].lower()
        else:
            file_type = 'json'
        params = kwargs.get('params')

        data = kwargs.get('data', kwargs.get('json', None))
        url = '{}/{}'.format(self.api_url, endpoint)
        self._validate_request(endpoint, file_type, data, params)

        if method == 'get':
            stream = kwargs.get('stream', False)
            url = '{}.{}'.format(url, file_type)
            r = self.session.get(url, params=params, stream=stream)

        elif method == 'post':
            r = self.session.post(url=url, json=data, params=params)

        elif method == 'put':
            r = self.session.put(url=url, json=data, params=params)

        elif method == 'patch':
            r = self.session.patch(url=url, json=data, params=params)

        elif method == 'delete':
            r = self.session.delete(url=url, params=params)

        else:
            raise ClientException("Non-supported HTTP method: {}".format(method))

        return self._validate_response(r)