/** * Method that provides an HTML parser for response configuration (uses JSoup). * * @param config the chained configuration * @param fromServer the server response adapter * @return the parsed HTML content (a {@link Document} object) */ public static Object jsoupParse(final ChainedHttpConfig config, final FromServer fromServer) { try { return Jsoup.parse(fromServer.getInputStream(), fromServer.getCharset().name(), fromServer.getUri().toString()); } catch (IOException e) { throw new RuntimeException(e); } }
/** * Method that provides an HTML parser for response configuration (uses JSoup). * * @param config the chained configuration * @param fromServer the server response adapter * @return the parsed HTML content (a {@link Document} object) */ public static Object jsoupParse(final ChainedHttpConfig config, final FromServer fromServer) { try { return Jsoup.parse(fromServer.getInputStream(), fromServer.getCharset().name(), fromServer.getUri().toString()); } catch (IOException e) { throw new TransportingException(e); } }
/** * Method that provides an HTML parser for response configuration (uses JSoup). * * @param config the chained configuration * @param fromServer the server response adapter * @return the parsed HTML content (a {@link Document} object) */ public static Object jsoupParse(final ChainedHttpConfig config, final FromServer fromServer) { try { return Jsoup.parse(fromServer.getInputStream(), fromServer.getCharset().name(), fromServer.getUri().toString()); } catch (IOException e) { throw new TransportingException(e); } }