Bug
When trying to work with the clientlogin method and using the default example from the documentation the user may encounter an issue where the response.json() produces json encoding error in the runtime. For example a common error would be:
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Expected behavior
Received the response that is documented in the docs:
{
"clientlogin":{
"status":"PASS",
"username":"William"
}
}
Workaround
I'd suggest parsing the response using:
data = json.loads(response.content)
instead of:
data = response.json()