getRequest method

Implementation

APIRequestEntity getRequest(
    AppApisState state, ExecuteAPIRequestAction action) {
  assert(state.apis[action.requestID] != null, 'No request found');
  assert(state.apis[action.requestID] is APIRequestEntity,
      'Request is not of type APIRequestEntity');
  final request = state.apis[action.requestID] as APIRequestEntity?;
  if (request == null) throw Exception('No request found');
  return request;
}