def _post_request(self, url, data=None, files=None):

        ''' a helper method for sending post requests to telegram api

        https://core.telegram.org/bots/api#making-requests
        https://requests.readthedocs.io/en/master/user/quickstart/

        :param url: string with url for post request
        :param data: [optional] dictionary with data to add to request
        :param files: [optional] byte data to add to request
        :return: dictionary with response details
        '''

        import requests

    # construct request fields
        request_kwargs = {
            'url': url
        }
        if data:
            request_kwargs['data'] = data
        if files:
            request_kwargs['files'] = files

    # send request
        try:
            response = requests.post(**request_kwargs)
        except Exception:
            if self.requests_handler:
                request_kwargs['method'] = 'POST'
                request_object = requests.Request(**request_kwargs)
                return self.requests_handler(request_object)
            else:
                raise

    # handle response
        response_details = self.telegram_handler.handle(response)

        return response_details