From f0df0aba1e2153abe98463c8aea6385e08d419b5 Mon Sep 17 00:00:00 2001 From: Iulian Masar Date: Fri, 9 Aug 2024 17:29:30 +0300 Subject: [PATCH] disabled truncating data --- mangopay/api.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mangopay/api.py b/mangopay/api.py index f176b99..308cb85 100644 --- a/mangopay/api.py +++ b/mangopay/api.py @@ -90,7 +90,7 @@ def custom_request(self, method, url, data=None, idempotency_key=None, oauth_req params.__delitem__(str("data_XXX")) headers['Content-Type'] = 'application/x-www-form-urlencoded' - truncated_data = None + # truncated_data = None encoded_params = urlrequest.urlencode(params) @@ -103,16 +103,16 @@ def custom_request(self, method, url, data=None, idempotency_key=None, oauth_req url = '%s?%s' % (url, encoded_params) if data or data == {}: - truncated_data = truncatechars(copy.copy(data)) + # truncated_data = truncatechars(copy.copy(data)) data = json.dumps(data, default=lambda x: x.to_api_json()) - logger.debug('DATA[IN -> %s]\n\t- headers: %s\n\t- content: %s', url, headers, truncated_data) + logger.debug('DATA[IN -> %s]\n\t- headers: %s\n\t- content: %s', url, headers, data) ts = time.time() # signal: - request_started.send(url=url, data=truncated_data, headers=headers, method=method) + request_started.send(url=url, data=data, headers=headers, method=method) try: result = requests_session.request(method, url, @@ -143,7 +143,7 @@ def custom_request(self, method, url, data=None, idempotency_key=None, oauth_req # signal: request_finished.send(url=url, - data=truncated_data, + data=data, headers=headers, method=method, result=result, @@ -162,7 +162,7 @@ def custom_request(self, method, url, data=None, idempotency_key=None, oauth_req if result.status_code not in (requests.codes.ok, requests.codes.not_found, requests.codes.created, requests.codes.accepted, requests.codes.no_content): - self._create_apierror(result, url=url, data=truncated_data, method=method) + self._create_apierror(result, url=url, data=data, method=method) elif result.status_code == requests.codes.no_content: return result, None else: