Commit 2e247767 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Remove unused method set_default_headers

parent 9af3a427
......@@ -167,9 +167,6 @@ class Client(object):
if iff:
self.http_client.set_param(name, value)
def set_default_header(self, name, value):
self.http_client.headers.setdefault(name, value)
def request(
......@@ -190,13 +187,17 @@ class Client(object):
success = kwargs.pop('success', 200)
data = kwargs.pop('data', None)
self.set_default_header('X-Auth-Token', self.token)
self.http_client.headers.setdefault('X-Auth-Token', self.token)
if 'json' in kwargs:
data = dumps(kwargs.pop('json'))
self.set_default_header('Content-Type', 'application/json')
if data:
self.set_default_header('Content-Length', '%s' % len(data))
'%s' % len(data))'perform a %s @ %s', method, self.base_url)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment