public ClientResponse getResponse ( String url , Method method ) throws Exception { Builder resource = getResource ( url ) ; ClientResponse response = null ; switch ( method ) { case Get : response = resource . get ( ClientResponse . class ) ; break ; case Post : response = resource . post ( ClientResponse . class ) ; break ; case Head : response = resource . head ( ) ; break ; case Put : response = resource . put ( ClientResponse . class ) ; break ; } return response ; }
get a response for the given url and method