From b5ea50bdac50ebe219401b6876492ec6f8218780 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Mon, 17 Jun 2024 15:25:04 +0000 Subject: [PATCH] chore(internal): add a `default_query` method --- src/finch/_base_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/finch/_base_client.py b/src/finch/_base_client.py index 128e20d2..05df2cd6 100644 --- a/src/finch/_base_client.py +++ b/src/finch/_base_client.py @@ -457,7 +457,7 @@ def _build_request( raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`") headers = self._build_headers(options) - params = _merge_mappings(self._custom_query, options.params) + params = _merge_mappings(self.default_query, options.params) content_type = headers.get("Content-Type") # If the given Content-Type header is multipart/form-data then it @@ -593,6 +593,12 @@ def default_headers(self) -> dict[str, str | Omit]: **self._custom_headers, } + @property + def default_query(self) -> dict[str, object]: + return { + **self._custom_query, + } + def _validate_headers( self, headers: Headers, # noqa: ARG002