@@ -394,7 +394,7 @@ def get_user(self, **kwargs):
394394 raise TypeError ('Unsupported keyword arguments: {0}.' .format (kwargs ))
395395
396396 try :
397- response = self ._client .request ('post' , 'getAccountInfo' , json = payload )
397+ response = self ._client .body ('post' , 'getAccountInfo' , json = payload )
398398 except requests .exceptions .RequestException as error :
399399 msg = 'Failed to get user by {0}: {1}.' .format (key_type , key )
400400 self ._handle_http_error (INTERNAL_ERROR , msg , error )
@@ -421,7 +421,7 @@ def list_users(self, page_token=None, max_results=MAX_LIST_USERS_RESULTS):
421421 if page_token :
422422 payload ['nextPageToken' ] = page_token
423423 try :
424- return self ._client .request ('post' , 'downloadAccount' , json = payload )
424+ return self ._client .body ('post' , 'downloadAccount' , json = payload )
425425 except requests .exceptions .RequestException as error :
426426 self ._handle_http_error (USER_DOWNLOAD_ERROR , 'Failed to download user accounts.' , error )
427427
@@ -440,7 +440,7 @@ def create_user(self, uid=None, display_name=None, email=None, phone_number=None
440440 }
441441 payload = {k : v for k , v in payload .items () if v is not None }
442442 try :
443- response = self ._client .request ('post' , 'signupNewUser' , json = payload )
443+ response = self ._client .body ('post' , 'signupNewUser' , json = payload )
444444 except requests .exceptions .RequestException as error :
445445 self ._handle_http_error (USER_CREATE_ERROR , 'Failed to create new user.' , error )
446446 else :
@@ -490,7 +490,7 @@ def update_user(self, uid, display_name=_UNSPECIFIED, email=None, phone_number=_
490490
491491 payload = {k : v for k , v in payload .items () if v is not None }
492492 try :
493- response = self ._client .request ('post' , 'setAccountInfo' , json = payload )
493+ response = self ._client .body ('post' , 'setAccountInfo' , json = payload )
494494 except requests .exceptions .RequestException as error :
495495 self ._handle_http_error (
496496 USER_UPDATE_ERROR , 'Failed to update user: {0}.' .format (uid ), error )
@@ -503,7 +503,7 @@ def delete_user(self, uid):
503503 """Deletes the user identified by the specified user ID."""
504504 _auth_utils .validate_uid (uid , required = True )
505505 try :
506- response = self ._client .request ('post' , 'deleteAccount' , json = {'localId' : uid })
506+ response = self ._client .body ('post' , 'deleteAccount' , json = {'localId' : uid })
507507 except requests .exceptions .RequestException as error :
508508 self ._handle_http_error (
509509 USER_DELETE_ERROR , 'Failed to delete user: {0}.' .format (uid ), error )
@@ -529,7 +529,7 @@ def import_users(self, users, hash_alg=None):
529529 raise ValueError ('A UserImportHash is required to import users with passwords.' )
530530 payload .update (hash_alg .to_dict ())
531531 try :
532- response = self ._client .request ('post' , 'uploadAccount' , json = payload )
532+ response = self ._client .body ('post' , 'uploadAccount' , json = payload )
533533 except requests .exceptions .RequestException as error :
534534 self ._handle_http_error (USER_IMPORT_ERROR , 'Failed to import users.' , error )
535535 else :
0 commit comments