projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace pycurl library in osmclient by requests library
[osm/osmclient.git]
/
osmclient
/
sol005
/
client.py
diff --git
a/osmclient/sol005/client.py
b/osmclient/sol005/client.py
index
0cbc80a
..
b05dbcc
100644
(file)
--- a/
osmclient/sol005/client.py
+++ b/
osmclient/sol005/client.py
@@
-77,10
+77,7
@@
class Client(object):
)
self._headers["Accept"] = "application/json"
self._headers["Content-Type"] = "application/yaml"
)
self._headers["Accept"] = "application/json"
self._headers["Content-Type"] = "application/yaml"
- http_header = [
- "{}: {}".format(key, val) for (key, val) in list(self._headers.items())
- ]
- self._http_client.set_http_header(http_header)
+ self._http_client.set_http_header(self._headers)
self.vnfd = vnfd.Vnfd(self._http_client, client=self)
self.nsd = nsd.Nsd(self._http_client, client=self)
self.vnfd = vnfd.Vnfd(self._http_client, client=self)
self.nsd = nsd.Nsd(self._http_client, client=self)
@@
-137,11
+134,7
@@
class Client(object):
if self._token is not None:
self._headers["Authorization"] = "Bearer {}".format(self._token)
if self._token is not None:
self._headers["Authorization"] = "Bearer {}".format(self._token)
- http_header = [
- "{}: {}".format(key, val)
- for (key, val) in list(self._headers.items())
- ]
- self._http_client.set_http_header(http_header)
+ self._http_client.set_http_header(self._headers)
return token
def get_version(self):
return token
def get_version(self):