|
18 | 18 | LLMWhispererClientException: Exception raised for errors in the LLMWhispererClient. |
19 | 19 | """ |
20 | 20 |
|
21 | | -import copy |
22 | 21 | import json |
23 | 22 | import logging |
24 | 23 | import os |
@@ -504,9 +503,7 @@ def register_webhook(self, url: str, auth_token: str, webhook_name: str) -> dict |
504 | 503 | "webhook_name": webhook_name, |
505 | 504 | } |
506 | 505 | url = f"{self.base_url}/whisper-manage-callback" |
507 | | - headersx = copy.deepcopy(self.headers) |
508 | | - headersx["Content-Type"] = "application/json" |
509 | | - req = requests.Request("POST", url, headers=headersx, json=data) |
| 506 | + req = requests.Request("POST", url, headers=self.headers, json=data) |
510 | 507 | prepared = req.prepare() |
511 | 508 | s = requests.Session() |
512 | 509 | response = s.send(prepared, timeout=self.api_timeout) |
@@ -543,9 +540,7 @@ def update_webhook_details(self, webhook_name: str, url: str, auth_token: str) - |
543 | 540 | "webhook_name": webhook_name, |
544 | 541 | } |
545 | 542 | url = f"{self.base_url}/whisper-manage-callback" |
546 | | - headersx = copy.deepcopy(self.headers) |
547 | | - headersx["Content-Type"] = "application/json" |
548 | | - req = requests.Request("PUT", url, headers=headersx, json=data) |
| 543 | + req = requests.Request("PUT", url, headers=self.headers, json=data) |
549 | 544 | prepared = req.prepare() |
550 | 545 | s = requests.Session() |
551 | 546 | response = s.send(prepared, timeout=self.api_timeout) |
|
0 commit comments