diff --git a/nado_protocol/engine_client/execute.py b/nado_protocol/engine_client/execute.py index eadbb77..fb5f667 100644 --- a/nado_protocol/engine_client/execute.py +++ b/nado_protocol/engine_client/execute.py @@ -60,6 +60,7 @@ def __init__( self._opts: EngineClientOpts = EngineClientOpts.parse_obj(opts) self.url: str = self._opts.url self.session = requests.Session() + self.session.headers.update({"Accept-Encoding": "gzip"}) def tx_nonce(self, sender: str) -> int: """ diff --git a/nado_protocol/engine_client/query.py b/nado_protocol/engine_client/query.py index b85f087..7f97e7e 100644 --- a/nado_protocol/engine_client/query.py +++ b/nado_protocol/engine_client/query.py @@ -77,6 +77,7 @@ def __init__(self, opts: EngineClientOpts): self.url: str = self._opts.url self.url_v2: str = self.url.replace("/v1", "") + "/v2" self.session = requests.Session() # type: ignore + self.session.headers.update({"Accept-Encoding": "gzip"}) def query(self, req: QueryRequest) -> QueryResponse: """ diff --git a/nado_protocol/indexer_client/query.py b/nado_protocol/indexer_client/query.py index 5d11580..0ac5daa 100644 --- a/nado_protocol/indexer_client/query.py +++ b/nado_protocol/indexer_client/query.py @@ -72,6 +72,7 @@ def __init__(self, opts: IndexerClientOpts): self.url = self._opts.url self.url_v2: str = self.url.replace("/v1", "") + "/v2" self.session = requests.Session() + self.session.headers.update({"Accept-Encoding": "gzip"}) @singledispatchmethod def query(self, params: Union[IndexerParams, IndexerRequest]) -> IndexerResponse: diff --git a/nado_protocol/trigger_client/execute.py b/nado_protocol/trigger_client/execute.py index 5c857e5..64b55e6 100644 --- a/nado_protocol/trigger_client/execute.py +++ b/nado_protocol/trigger_client/execute.py @@ -44,6 +44,7 @@ def __init__(self, opts: TriggerClientOpts): self._opts: TriggerClientOpts = TriggerClientOpts.parse_obj(opts) self.url: str = self._opts.url self.session = requests.Session() + self.session.headers.update({"Accept-Encoding": "gzip"}) def tx_nonce(self, _: str) -> int: raise NotImplementedError diff --git a/nado_protocol/trigger_client/query.py b/nado_protocol/trigger_client/query.py index 18c4405..6081204 100644 --- a/nado_protocol/trigger_client/query.py +++ b/nado_protocol/trigger_client/query.py @@ -26,6 +26,7 @@ def __init__(self, opts: TriggerClientOpts): self._opts: TriggerClientOpts = TriggerClientOpts.parse_obj(opts) self.url: str = self._opts.url self.session = requests.Session() # type: ignore + self.session.headers.update({"Accept-Encoding": "gzip"}) def tx_nonce(self, _: str) -> int: raise NotImplementedError diff --git a/pyproject.toml b/pyproject.toml index 32e1ef0..09ecec1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nado-protocol" -version = "0.3.0" +version = "0.3.1" description = "Nado Protocol SDK" authors = ["Jeury Mejia "] homepage = "https://nado.xyz"