From 5c36c6623766a21d4bd11ff9fde823336031b72c Mon Sep 17 00:00:00 2001 From: Sergey Afonin Date: Wed, 20 Apr 2022 09:56:46 +0300 Subject: [PATCH] - fix issue with returned reason --- apns2/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apns2/client.py b/apns2/client.py index ca5f1f4..fbb447c 100644 --- a/apns2/client.py +++ b/apns2/client.py @@ -147,7 +147,7 @@ class APNsClient(object): url = '/3/device/{}'.format(token_hex) response = self.__client.post('https://{}{}'.format(self.__server, url), headers=headers, data=json_payload) - return response.status_code, response.json() + return response.status_code, response.text def get_notification_result(self, status: int, reason: str) -> Union[str, Tuple[str, str]]: """