Package com.mku.fs.file
Class HttpSyncClient
java.lang.Object
com.mku.fs.file.HttpSyncClient
HTTP client
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpURLConnectioncreateConnection(String urlPath) Create a new connection from a urlstatic booleanCheck if clear text traffic (HTTP) is allowed, otherwise you need to use secure HTTPS protocols.static voidsetAllowClearTextTraffic(boolean allow) Set to true to allow clear text traffic (HTTP), otherwise you need to use secure HTTPS protocols.
-
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
Create a new connection from a url- Parameters:
urlPath- The url- Returns:
- The connection
- Throws:
IOException- if error with IO
-