diff options
author | Ram Krishna Verma <ram.krishna.verma@est.tech> | 2019-07-01 15:21:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-07-01 15:21:39 +0000 |
commit | 3e60ff607e30e020d5909bf23bf571504e635c23 (patch) | |
tree | 6bd79f227891bf13ec3a5c7b03c8546254771fe3 /examples/examples-onap-bbs/src/main/java/org/onap | |
parent | 5052634e60545f5b483660700d47eb4fff5d0d38 (diff) | |
parent | f08984b16abf954b7b351f21a3822e21d9d4f7c2 (diff) |
Merge "Fix issues from Checkstyle reviews"
Diffstat (limited to 'examples/examples-onap-bbs/src/main/java/org/onap')
-rw-r--r-- | examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java b/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java index 939b104d1..e4186f131 100644 --- a/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java +++ b/examples/examples-onap-bbs/src/main/java/org/onap/policy/apex/examples/bbs/WebClient.java @@ -70,11 +70,10 @@ public class WebClient { * @param username Simple Username * @param pass Simple password * @param contentType http content type - * @apram secureHttp flag indicating if HTTPS should be used * @return String response message */ public String httpRequest(String requestUrl, String requestMethod, String outputStr, String username, String pass, - String contentType, boolean secureHttp) { + String contentType) { String result = ""; StringBuilder builder = new StringBuilder(); try { @@ -82,13 +81,8 @@ public class WebClient { disableCertificateValidation(); URL url = new URL(requestUrl); - HttpURLConnection httpUrlConn = null; - if (secureHttp) { - httpUrlConn = (HttpsURLConnection) url.openConnection(); - } - else { - httpUrlConn = (HttpURLConnection) url.openConnection(); - } + HttpURLConnection httpUrlConn = (HttpURLConnection) url.openConnection(); + httpUrlConn.setDoOutput(true); httpUrlConn.setDoInput(true); httpUrlConn.setUseCaches(false); |