@ Urlencoded @ Deprecated public static String getContentAsString ( HTTPSession session , String urlencoded ) throws IOException { HTTPSession useSession = session ; try { if ( useSession == null ) useSession = HTTPFactory . newSession ( urlencoded ) ; try ( HTTPMethod m = HTTPFactory . Get ( useSession , urlencoded ) ) { m . execute ( ) ; return m . getResponseAsString ( ) ; } } finally { if ( ( session == null ) && ( useSession != null ) ) useSession . close ( ) ; } }
Get the content from a url . For large returns its better to use getResponseAsStream .