extract duplicated request logic into a helper method