@@ -57,8 +57,10 @@ def __init__(self, api_token, **kwargs):
5757 'User-Agent' : 'target-datadotworld - {}' .format (__version__ )
5858 }
5959 self ._session .headers .update (default_headers )
60+
61+ # TODO Fix and turn GzipAdapter back on (GH Issue #10)
6062 self ._session .mount (self ._api_url ,
61- BackoffAdapter (GzipAdapter ( HTTPAdapter () )))
63+ BackoffAdapter (HTTPAdapter ()))
6264
6365 # Create a limited thread pool.
6466 self ._executor = ThreadPoolExecutor (
@@ -101,7 +103,8 @@ def append_stream(self, owner, dataset, stream, records):
101103 '{}/streams/{}/{}/{}' .format (
102104 self ._api_url , owner , dataset , stream ),
103105 data = to_jsonlines (records ).encode ('utf-8' ),
104- headers = {'Content-Type' : 'application/json-l' }
106+ headers = {'Content-Type' :
107+ 'application/json-l; charset=utf-8' }
105108 ).raise_for_status ()
106109 except RequestException as e :
107110 raise convert_requests_exception (e )
@@ -210,7 +213,8 @@ def create_dataset(self, owner, dataset, **kwargs):
210213 raise convert_requests_exception (e )
211214
212215
213- class GzipAdapter (BaseAdapter ):
216+ # TODO Re-enable test coverage (GH issue #10)
217+ class GzipAdapter (BaseAdapter ): # pragma: no cover
214218 def __init__ (self , delegate ):
215219 """Requests adapter for compressing request bodies
216220
0 commit comments