Class HttpUtilities

  • java.lang.Object
    • com.thingworx.common.utils.HttpUtilities
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpUtilities()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static org.apache.http.impl.client.CloseableHttpClient createHttpClient​(java.lang.String username, byte[] password, java.lang.Boolean ignoreSSLErrors, java.lang.Double timeout, java.lang.Boolean useNTLM, java.lang.String workstation, java.lang.String domain, java.lang.Boolean useProxy, java.lang.String proxyHost, java.lang.Integer proxyPort, java.lang.String proxyScheme)  
      static org.apache.http.impl.client.CloseableHttpClient createHttpClient​(java.lang.String username, java.lang.String password, java.lang.Boolean ignoreSSLErrors, java.lang.Double timeout, java.lang.Boolean useNTLM, java.lang.String workstation, java.lang.String domain, java.lang.Boolean useProxy, java.lang.String proxyHost, java.lang.Integer proxyPort, java.lang.String proxyScheme)
      Deprecated.
      static void validateDomainWithoutProtocol​(java.lang.String domain)


      Validate the domain name against the white list of domains, if the validation is enabled.
      • Methods inherited from class java.lang.Object

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

      • RESPONSE_HEADERS

        public static final java.lang.String RESPONSE_HEADERS
        See Also:
        Constant Field Values
      • PROTOCOL_VERSION

        public static final java.lang.String PROTOCOL_VERSION
        See Also:
        Constant Field Values
      • TRUSTED_DOMAINS

        public static final java.util.HashSet<java.lang.String> TRUSTED_DOMAINS
      • ignoreTrustedDomains

        public static boolean ignoreTrustedDomains
    • Constructor Detail

      • HttpUtilities

        public HttpUtilities()
    • Method Detail

      • createHttpClient

        @Deprecated
        @ThingworxExtensionApiMethod(since={6,6},
                                     deprecatedSince={8,4})
        public static org.apache.http.impl.client.CloseableHttpClient createHttpClient​(java.lang.String username,
                                                                                       java.lang.String password,
                                                                                       java.lang.Boolean ignoreSSLErrors,
                                                                                       java.lang.Double timeout,
                                                                                       java.lang.Boolean useNTLM,
                                                                                       java.lang.String workstation,
                                                                                       java.lang.String domain,
                                                                                       java.lang.Boolean useProxy,
                                                                                       java.lang.String proxyHost,
                                                                                       java.lang.Integer proxyPort,
                                                                                       java.lang.String proxyScheme)
        Deprecated.
      • createHttpClient

        @ThingworxExtensionApiMethod(since={8,4})
        public static org.apache.http.impl.client.CloseableHttpClient createHttpClient​(java.lang.String username,
                                                                                       byte[] password,
                                                                                       java.lang.Boolean ignoreSSLErrors,
                                                                                       java.lang.Double timeout,
                                                                                       java.lang.Boolean useNTLM,
                                                                                       java.lang.String workstation,
                                                                                       java.lang.String domain,
                                                                                       java.lang.Boolean useProxy,
                                                                                       java.lang.String proxyHost,
                                                                                       java.lang.Integer proxyPort,
                                                                                       java.lang.String proxyScheme)
      • validateDomainWithoutProtocol

        @ThingworxExtensionApiMethod(since={9,3})
        public static void validateDomainWithoutProtocol​(java.lang.String domain)
                                                  throws java.lang.IllegalAccessException


        Validate the domain name against the white list of domains, if the validation is enabled.
        Parameters:
        domain - - Domain name to validate
        Throws:
        java.lang.IllegalAccessException