refactor requestApi