We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 62d50f2 commit f2c9663Copy full SHA for f2c9663
volcenginesdkcore/interceptor/interceptors/response.py
@@ -1,5 +1,12 @@
1
+import json
2
class Response:
3
def __init__(self, http_response):
4
self.http_response = http_response
5
self.result = None
6
self.metadata = None
7
+ self.__post_init__()
8
+
9
+ def __post_init__(self):
10
+ data = json.loads(self.http_response.data)
11
+ self.result = data.get("Result")
12
+ self.metadata = data.get("ResponseMetadata")
0 commit comments