Class HttpSyncClient


  • public class HttpSyncClient
    extends java.lang.Object
    HTTP client
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpSyncClient()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.net.HttpURLConnection createConnection​(java.lang.String urlPath)
      Create a new connection from a url
      static boolean getAllowClearTextTraffic()
      Check if clear text traffic (HTTP) is allowed, otherwise you need to use secure HTTPS protocols.
      static void setAllowClearTextTraffic​(boolean allow)
      Set to true to allow clear text traffic (HTTP), otherwise you need to use secure HTTPS protocols.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpSyncClient

        public HttpSyncClient()
    • Method Detail

      • 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 java.net.HttpURLConnection createConnection​(java.lang.String urlPath)
                                                           throws java.io.IOException
        Create a new connection from a url
        Parameters:
        urlPath - The url
        Returns:
        The connection
        Throws:
        java.io.IOException - if error with IO