From 1eae2dcc3cb5ffe050c552ee31cc45906c25d073 Mon Sep 17 00:00:00 2001 From: richard-dds Date: Mon, 18 Jun 2018 11:56:16 -0400 Subject: [PATCH] Make ApiClient more tolerant of Content-Types --- atst/api_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atst/api_client.py b/atst/api_client.py index 1bc57f49..a8a8d9bd 100644 --- a/atst/api_client.py +++ b/atst/api_client.py @@ -40,7 +40,7 @@ class ApiClient(object): return self.adapt_response(response) def adapt_response(self, response): - if response.headers['Content-Type'] == 'application/json': + if 'application/json' in response.headers['Content-Type']: json = loads(response.body) setattr(response, 'json', json) setattr(response, 'ok', 200 <= response.code < 300)