From d99b2ba9c3d8f2a4db824e6cf62dfe1ff8f6387e Mon Sep 17 00:00:00 2001 From: Ken Schwencke Date: Tue, 19 Mar 2013 16:28:22 -0700 Subject: [PATCH] Added response headers to logger Because they P2P guy asked, so why not have 'em by default? --- p2p/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/p2p/__init__.py b/p2p/__init__.py index 793f375..3630841 100644 --- a/p2p/__init__.py +++ b/p2p/__init__.py @@ -511,6 +511,7 @@ def post_json(self, url, data): log.debug('PAYLOAD: %s' % json.dumps(data)) log.debug('STATUS: %s' % resp.status_code) log.debug('RESPONSE_BODY: %s' % resp.content) + log.debug('RESPONSE_HEADERS: %s' % resp.headers) if resp.status_code >= 500: resp.raise_for_status() elif resp.status_code >= 400: @@ -529,6 +530,7 @@ def put_json(self, url, data): log.debug('PAYLOAD: %s' % json.dumps(data)) log.debug('STATUS: %s' % resp.status_code) log.debug('RESPONSE_BODY: %s' % resp.content) + log.debug('RESPONSE_HEADERS: %s' % resp.headers) if resp.status_code >= 500: resp.raise_for_status() elif resp.status_code >= 400: