This code is repeated a lot. Consider making a helper method to which you pass the response type.