We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e5e9aa commit 921cd55Copy full SHA for 921cd55
opensearchpy/connection/http_requests.py
@@ -214,10 +214,10 @@ def perform_request( # type: ignore
214
raise ConnectionTimeout("TIMEOUT", str(e), e)
215
raise ConnectionError("N/A", str(e), e)
216
217
- # Add the service time to the response headers
+ # Add the service time to the raw_data
218
if calculate_service_time:
219
- raw_data["__client"] = {"Service_Time": str(duration)}
220
-
+ raw_data = raw_data.rstrip()[:-1] + f', "__client": {{"Service_Time": "{duration}"}}' + '}'
+
221
# raise warnings if any from the 'Warnings' header.
222
warnings_headers = (
223
(response.headers["warning"],) if "warning" in response.headers else ()
0 commit comments