Class WebUtilsHtmlUnit

java.lang.Object
de.frankmuenster.mahoe.utils.WebUtilsHtmlUnit

public final class WebUtilsHtmlUnit extends Object
Utility class for web methods
Author:
Frank Münster
  • Method Details

    • getPdfAsByteArray

      public static byte[] getPdfAsByteArray(org.htmlunit.html.HtmlAnchor link)
      Read the account statement PDF from an HTMLUnit anchor into a byte array.
      Parameters:
      link - the HMTLUnit anchor to the PDF
      Returns:
      the PDF as byte array
    • webResponseIsJson

      public static boolean webResponseIsJson(org.htmlunit.WebResponse webResponse)
      Überprüft die Webantwort, ob der http Statuscode 200 ist und die Antwort im JSON-Format vorliegt.
      Parameters:
      webResponse -
      Returns:
      true wenn HHTP code 200 und Antwortinhalt application/json ist, sonst false.