Fix HttpClient change which broke multicloud 54/73754/1
authorEric Multanen <eric.w.multanen@intel.com>
Wed, 28 Nov 2018 09:00:00 +0000 (01:00 -0800)
committerEric Multanen <eric.w.multanen@intel.com>
Wed, 28 Nov 2018 09:38:39 +0000 (01:38 -0800)
The lines added to HttpClient in https://gerrit.onap.org/r/#/c/72771/
broke the usage of HttpClient by the multicloud adapter.

The 'content-type' line seems redundant - content type is specified
in the HttpClient constructor.

The 'Authorization' line (which broke multicloud usage) seems
inappropriate here.  The Authorization string shouldn't be
hard coded into a generic client.  There are other methods
available for adding the authentication header.

Change-Id: I19ac1a382778fe50bc7e98e1e9b9a4d84897b2a6
Issue-ID: SO-1257
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
common/src/main/java/org/onap/so/client/HttpClient.java

index 9c4b573..b991e79 100644 (file)
@@ -42,8 +42,6 @@ public class HttpClient extends RestClient {
 
        @Override
        protected void initializeHeaderMap(Map<String, String> headerMap) {
-               headerMap.put("Authorization", "Basic YnBlbDpwYXNzd29yZDEk");
-               headerMap.put("content-type", "application/json");
        }
 
        @Override