Skip to content

Commit 945de7d

Browse files
author
Sara Safavi
committed
set login headers as content-type:application/json during planet init
1 parent 621f773 commit 945de7d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

planet/api/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ def login(self, identity, credentials):
7272
:param str credentials: password
7373
:returns: JSON object (Python dict)
7474
'''
75-
result = self.dispatcher.session.post(self._url('v0/auth/login'), {
76-
'email': identity,
77-
'password': credentials
78-
})
75+
result = self.dispatcher.session.post(self._url('v0/auth/login'),
76+
json={
77+
'email': identity,
78+
'password': credentials
79+
})
7980
status = result.status_code
8081
if status == 400:
8182
raise APIException('invalid parameters, login process has changed')

0 commit comments

Comments
 (0)