| 32 | self.default_headers = default_headers if default_headers else {} |
| 33 | |
| 34 | def send( |
| 35 | self, |
| 36 | *, |
| 37 | text: Optional[str] = None, |
| 38 | attachments: Optional[List[Union[Dict[str, any], Attachment]]] = None, |
| 39 | blocks: Optional[List[Union[Dict[str, any], Block]]] = None, |
| 40 | response_type: Optional[str] = None, |
| 41 | headers: Optional[Dict[str, str]] = None, |
| 42 | ) -> WebhookResponse: |
| 43 | return self.send_dict( |
| 44 | body={ |
| 45 | "text": text, |
| 46 | "attachments": attachments, |
| 47 | "blocks": blocks, |
| 48 | "response_type": response_type, |
| 49 | }, |
| 50 | headers=headers, |
| 51 | ) |
| 52 | |
| 53 | def send_dict(self, body: Dict[str, any], headers: Optional[Dict[str, str]] = None) -> WebhookResponse: |
| 54 | return self._perform_http_request( |