def prepare_request(self):
        params = {
            'message': self.message,
            'message_format': self.message_format,
            'color': self.color,
            'from': self.frm,
            'attach_to': self.attach_to,
            'notify': self.notify,
            'card': self.card
        }

        self.method = 'POST'
        self.url = '%s/room/%s/notification' % (self.base_url, self.room_id)
        self.body = json.dumps(dict(
            (k.encode('utf-8'), v.encode('utf-8')) for k, v in params.iteritems() if v))
dataset/ETHPy150Open airbnb/airflow/airflow/contrib/operators/hipchat_operator.py/HipChatAPISendRoomNotificationOperator.prepare_request/original