def header(self): b64 = b64encode(('%s:%s' % ( self.username, self.password)).encode(DEFAULT_CHARSET)) return 'Basic %s' % to_string(b64.strip(), DEFAULT_CHARSET)
def header(self): b64 = b64encode( ('%s:%s' % (self.username, self.password)).encode(DEFAULT_CHARSET)) return 'Basic %s' % to_string(b64.strip(), DEFAULT_CHARSET)
def loads(cls, content): return json.loads(to_string(content), object_hook=DefaultJSONHook)