public async Task <List <SelectOptionDto <int> > > GetRocketsForSelection() { try { var response = await _httpClient.GetAsync("api/Rockets/ForSelection"); return(await _serviceResponseHandler.HandleJsonResponse <List <RocketLaunchJournal.Infrastructure.Dtos.Helpers.SelectOptionDto <int> > >(response)); } catch (AccessTokenNotAvailableException exception) { exception.Redirect(); } return(new List <SelectOptionDto <int> >()); }
public async Task <List <RocketDto> > GetRockets() { try { var response = await _httpClient.GetAsync("api/Rockets"); return(await _serviceResponseHandler.HandleJsonResponse <List <RocketDto> >(response)); } catch (AccessTokenNotAvailableException exception) { exception.Redirect(); } return(new List <RocketDto>()); }