Refactored ApiRequest