Package com.thingworx.common.utils
Class HttpUtilities
- java.lang.Object
-
- com.thingworx.common.utils.HttpUtilities
-
@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public final class HttpUtilities extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
ignoreTrustedDomains
static java.lang.String
PROTOCOL_VERSION
static java.lang.String
REASON_PHRASE
static java.lang.String
RESPONSE_HEADERS
static java.lang.String
RESPONSE_STATUS
static java.lang.String
STATUS_CODE
static java.util.HashSet<java.lang.String>
TRUSTED_DOMAINS
-
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.
-
-
-
Field Detail
-
RESPONSE_STATUS
public static final java.lang.String RESPONSE_STATUS
- See Also:
- Constant Field Values
-
RESPONSE_HEADERS
public static final java.lang.String RESPONSE_HEADERS
- See Also:
- Constant Field Values
-
REASON_PHRASE
public static final java.lang.String REASON_PHRASE
- See Also:
- Constant Field Values
-
STATUS_CODE
public static final java.lang.String STATUS_CODE
- 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
-
-
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
-
-