def _send(self):
        """ Send the webhook method """

        payload = self.payload
        payload['url'] = self.url

        for i, wait in enumerate(range(len(self.attempts) - 1)):

            self.attempt = i + 1

            payload['attempt'] = self.attempt

            # post the payload
            self.response = requests.post(self.url, self.payload)
            if sys.version > '3':
                # Converts bytes object to str object in Python 3+
                self.response_content = self.response.content.decode('utf-8')
            else:
                self.response_content = self.response.content

            payload['status_code'] = self.response.status_code

            # anything with a 200 status code  is a success
            if self.response.status_code >= 200 and self.response.status_code < 300:
                # Exit the sender method.  Here we provide the payload as a result.
                #   This is useful for reporting.
                self.success = True
                self.notify("Attempt {}: Successfully sent webhook {}".format(
                    self.attempt, self.hash_value)
                )
                payload['response'] = self.response_content
                break

            self.notify("Attempt {}: Could not send webhook {}".format(
                    self.attempt, self.hash_value)
            )

            # Wait a bit before the next attempt
            sleep(wait)

        # Exit the send method.  Here we provide the payload as a result.
        return payload
dataset/ETHPy150Open pydanny/webhooks/webhooks/senders/base.py/Senderable._send/original