From 037a6829c341471c2c78a7a429f02dec671fd791 Mon Sep 17 00:00:00 2001 From: Alexander Novikov Date: Mon, 20 Mar 2017 04:20:35 -0700 Subject: [PATCH] Add orinal response field to asyncio response status --- pubnub/pubnub_asyncio.py | 3 ++- pubnub/structures.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pubnub/pubnub_asyncio.py b/pubnub/pubnub_asyncio.py index 980294d8..ae2f8343 100644 --- a/pubnub/pubnub_asyncio.py +++ b/pubnub/pubnub_asyncio.py @@ -180,7 +180,8 @@ def _request_helper(self, options_func, cancellation_event): origin=request_url.hostname, uuid=uuid, auth_key=auth_key, - client_request=None + client_request=None, + client_response=response ) if body is not None and len(body) > 0: diff --git a/pubnub/structures.py b/pubnub/structures.py index d0a14a08..440039a3 100644 --- a/pubnub/structures.py +++ b/pubnub/structures.py @@ -66,13 +66,14 @@ def __init__(self, headers, pn_config): class ResponseInfo(object): - def __init__(self, status_code, tls_enabled, origin, uuid, auth_key, client_request): + def __init__(self, status_code, tls_enabled, origin, uuid, auth_key, client_request, client_response=None): self.status_code = status_code self.tls_enabled = tls_enabled self.origin = origin self.uuid = uuid self.auth_key = auth_key self.client_request = client_request + self.client_response = client_response class Envelope(object):