<groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
<artifactId>dmaapClient</artifactId>
<packaging>jar</packaging>
- <version>1.1.5-SNAPSHOT</version>
+ <version>1.1.6-SNAPSHOT</version>
<name>dmaap-messagerouter-dmaapclient</name>
<description>Client library for MR event routing API</description>
<url>https://github.com/att/dmaap-framework</url>
return target.request().header("Authorization", "Basic " + authHeader).get();
}
+
+ public static Response postResponsewtBasicAuth(WebTarget target, String authHeader,byte[] data,String contentType) {
+
+ return target.request().header("Authorization", "Basic " + authHeader).post(Entity.entity(data, contentType));
+
+ }
public static Response getResponsewtNoAuth(WebTarget target) {
target = DmaapClientUtil.getTarget(path, username, password);
String encoding = Base64.encodeAsString(username + ":" + password);
- response = DmaapClientUtil.getResponsewtBasicAuth(target, encoding);
+ response = DmaapClientUtil.postResponsewtBasicAuth(target, encoding,data, contentType);
return getResponseDataInJson(response);
} else {
target = DmaapClientUtil.getTarget(path, username, password);
String encoding = Base64.encodeAsString(username + ":" + password);
- response = DmaapClientUtil.getResponsewtBasicAuth(target, encoding);
+ response = DmaapClientUtil.postResponsewtBasicAuth(target, encoding,data, contentType);
responseData = (String)response.readEntity(String.class);
return responseData;
PowerMockito.when(response.readEntity(String.class)).thenReturn("{\"test\":\"test\"}");
PowerMockito.when(response.getHeaders()).thenReturn(map);
- PowerMockito.when(DmaapClientUtil.getResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"),
- Base64.encodeAsString("username:password"))).thenReturn(response);
+ PowerMockito.when(DmaapClientUtil.postResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"),
+ Base64.encodeAsString("username:password"), new String("{\"test\":\"test\"}").getBytes(), "application/json")).thenReturn(response);
mrBaseClient.post("/path", new String("{\"test\":\"test\"}").getBytes(), "application/json", "username",
"password", "HTTPAUTH");
PowerMockito.when(response.readEntity(String.class)).thenReturn("{\"test\":\"test\"}");
PowerMockito.when(response.getHeaders()).thenReturn(map);
- PowerMockito.when(DmaapClientUtil.getResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"),
- Base64.encodeAsString("username:password"))).thenReturn(response);
+ PowerMockito.when(DmaapClientUtil.postResponsewtBasicAuth(DmaapClientUtil.getTarget("/path"),
+ Base64.encodeAsString("username:password"), new String("{\"test\":\"test\"}").getBytes(), "application/json")).thenReturn(response);
mrBaseClient.postWithResponse("/path", new String("{\"test\":\"test\"}").getBytes(), "application/json",
"username", "password", "HTTPAUTH");
major=1
minor=1
-patch=5
+patch=6
base_version=${major}.${minor}.${patch}