Updated User-Agent header to include client version

pull/266/head
Neeraj Kashyap 2021-09-20 14:46:39 -07:00
rodzic 1fb40c9651
commit 9192957a7e
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -77,7 +77,9 @@ class Moonstream:
self.api = APISpec(url=url, endpoints=endpoints)
self.timeout = timeout
self._session = requests.Session()
self._session.headers.update({"User-Agent": "Moonstream Python client"})
self._session.headers.update(
{"User-Agent": f"Moonstream Python client (version {CLIENT_VERSION})"}
)
def ping(self) -> Dict[str, Any]:
"""