Skip to content

Commit

Permalink
log request url
Browse files Browse the repository at this point in the history
  • Loading branch information
adityas1netapp committed Nov 27, 2024
1 parent 50d6632 commit 879a11b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spotinst_sdk2/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def send_get(self, url_components, entity_name, query_params=None):
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + geturl
self.print_output("Request URL - " + str(url))

result = requests.get(
url, params=query_params, headers=headers, timeout=self.timeout)
Expand Down Expand Up @@ -117,6 +118,7 @@ def send_delete(self, url_components, entity_name):
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + delurl
self.print_output("Request URL - " + str(url))

result = requests.delete(
url, params=query_params, headers=headers, timeout=self.timeout)
Expand Down Expand Up @@ -154,6 +156,7 @@ def send_delete_with_body(self, url_components, body, entity_name):
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + delurl
self.print_output("Request URL - " + str(url))

result = requests.delete(
url,
Expand Down Expand Up @@ -195,6 +198,7 @@ def send_delete_with_params(self, url_components, entity_name, user_query_params
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + delurl
self.print_output("Request URL - " + str(url))

result = requests.delete(
url,
Expand Down Expand Up @@ -240,6 +244,7 @@ def send_post(self, url_components, entity_name, body=None, query_params=None):
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + posturl
self.print_output("Request URL - " + str(url))

result = requests.post(
url,
Expand Down Expand Up @@ -284,6 +289,7 @@ def send_post_with_params(self, url_components, entity_name, body, user_query_pa
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + posturl
self.print_output("Request URL - " + str(url))

result = requests.post(
url,
Expand Down Expand Up @@ -331,6 +337,7 @@ def send_put(self, url_components, entity_name, query_params=None, body=None):
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + puturl
self.print_output("Request URL - " + str(url))

result = requests.put(
url,
Expand Down Expand Up @@ -374,6 +381,7 @@ def send_put_with_params(self, url_components, body, entity_name, user_query_par
# Check if the path is safe
if self.is_safe_path(url_components[0], path):
url = self.base_url + puturl
self.print_output("Request URL - " + str(url))

result = requests.put(
url,
Expand Down

0 comments on commit 879a11b

Please sign in to comment.