private static boolean isSuccessful(int responseCode){
  return responseCode == 200 || responseCode == 201 || responseCode == 202;
}

private static boolean isSuccessful ( int responseCode ) { return responseCode == 200 || responseCode == 201 || responseCode == 202 ; }
returns whether the response code indicates a successful http request .
