Class HttpSyncClient

java.lang.Object
com.mku.fs.file.HttpSyncClient

public class HttpSyncClient extends Object
HTTP client
  • Constructor Details

    • HttpSyncClient

      public HttpSyncClient()
  • Method Details

    • getAllowClearTextTraffic

      public static boolean getAllowClearTextTraffic()
      Check if clear text traffic (HTTP) is allowed, otherwise you need to use secure HTTPS protocols. Clear text traffic should ONLY be used for testing purposes.
      Returns:
      True if allow clear text traffic
    • setAllowClearTextTraffic

      public static void setAllowClearTextTraffic(boolean allow)
      Set to true to allow clear text traffic (HTTP), otherwise you need to use secure HTTPS protocols. Clear text traffic should ONLY be used for testing purposes.
      Parameters:
      allow - True to allow clear text traffic.
    • createConnection

      public static HttpURLConnection createConnection(String urlPath) throws IOException
      Create a new connection from a url
      Parameters:
      urlPath - The url
      Returns:
      The connection
      Throws:
      IOException - if error with IO