refactor: use Authorization header for authenticating sse

This commit is contained in:
Gustavo H. Strassburger
2025-12-15 17:47:44 -03:00
parent 7428cae4e7
commit ded73056b3
+2 -2
View File
@@ -2269,9 +2269,9 @@ class Client(object):
# Use requests with stream=True for SSE
import requests # type: ignore[import-untyped]
url = f"{self.host}/flags/definitions/stream?api_key={self.api_key}"
url = f"{self.host}/flags/definitions/stream"
headers = {
"Authorization": f"Bearer {self.personal_api_key}",
"Authorization": f"Bearer {self.api_key}",
"Accept": "text/event-stream",
}