(self, payload)
return response.decode('utf-8')
Send payload to slack API
Send payload to slack API
Send payload to slack API
def send(self, payload):
        """
        Send payload to slack API
        """
        payload_json = json.dumps(payload)
        data = urlencode({"payload": payload_json})
        req = urlrequest.Request(self.url)
        response = self.opener.open(req, data.encode('utf-8')).read()
        return response.decode('utf-8')
def send ( self , payload ) : payload_json = json . dumps ( payload ) data = urlencode ( { "payload" : payload_json } ) req = urlrequest . Request ( self . url ) response = self . opener . open ( req , data . encode ( 'utf-8' ) ) . read ( ) return response . decode ( 'utf-8' )