@@ -40,7 +40,8 @@ class AWSClient:
40
40
41
41
def _call (self , http_method , endpoint , payload = None , params = None ):
42
42
metric_name = self ._get_generic_endpoint_for_metric (http_method , endpoint )
43
- self .url = f'{ self .url } /{ endpoint } '
43
+ calling_url = f'{ self .url } /{ endpoint } '
44
+
44
45
if payload :
45
46
payload = json .dumps (payload , cls = DecimalEncoder )
46
47
@@ -49,14 +50,14 @@ def _call(self, http_method, endpoint, payload=None, params=None):
49
50
with TimingMetric ('python_common_aws.call' , tags = {'method' : metric_name }) as timer :
50
51
51
52
if http_method == self .METHOD_POST :
52
- response = self .session .post (self . url , data = payload , params = params )
53
+ response = self .session .post (calling_url , data = payload , params = params )
53
54
response_json = response .json ()
54
55
55
56
if response .status_code != status .HTTP_201_CREATED :
56
57
self ._process_error_object (metric_name , response , response_json )
57
58
58
59
elif http_method in self .RESPONSE_200_METHODS :
59
- response = getattr (self .session , http_method )(self . url , data = payload , params = params )
60
+ response = getattr (self .session , http_method )(calling_url , data = payload , params = params )
60
61
response_json = response .json ()
61
62
62
63
if response .status_code != status .HTTP_200_OK :
0 commit comments