import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.codehaus.jettison.json.JSONException;
-import org.openecomp.sdc.be.dao.rest.HttpRestClient;
import org.openecomp.sdc.be.model.User;
import org.openecomp.sdc.ci.tests.api.Urls;
import org.openecomp.sdc.ci.tests.config.Config;
import org.openecomp.sdc.ci.tests.datatypes.http.RestResponse;
import org.openecomp.sdc.ci.tests.utils.Utils;
import org.openecomp.sdc.ci.tests.utils.validation.ErrorValidationUtils;
-import org.openecomp.sdc.common.rest.api.RestResponseAsByteArray;
+import org.openecomp.sdc.common.http.client.api.HttpResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
}
}
- public static RestResponseAsByteArray getCsar(String csarUid, User sdncModifierDetails) throws Exception {
+ public static HttpResponse<byte []> getCsar(String csarUid, User sdncModifierDetails) throws Exception {
Config config = Utils.getConfig();
String url = String.format(Urls.GET_CSAR_USING_SIMULATOR, config.getCatalogBeHost(), config.getCatalogBePort(),
// System.out.println(url);
// System.out.println(userBodyJson);
- HttpRestClient httpRestClient = new HttpRestClient();
-
for (Map.Entry<String, String> mapEntry : headersMap.entrySet()) {
downloadCsarHeaders.put(mapEntry.getKey(), mapEntry.getValue());
}
- RestResponseAsByteArray doGetAsByteArray = httpRestClient.doGetAsByteArray(url, downloadCsarHeaders);
- // RestResponse getCsar = http.httpSendGet(url, headersMap);
-
- return doGetAsByteArray;
-
+ return org.openecomp.sdc.common.http.client.api.HttpRequest.getAsByteArray(url, downloadCsarHeaders);
}
private static File getGroupTypeZipFile(String elementName) throws IOException {