public static String get ( String url , Map < String , String > queryParas , Map < String , String > headers ) { HttpURLConnection conn = null ; try { conn = getHttpConnection ( buildUrlWithQueryString ( url , queryParas ) , GET , headers ) ; conn . connect ( ) ; return readResponseString ( conn ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } finally { if ( conn != null ) { conn . disconnect ( ) ; } } }
Send GET request