few changes on download api

revert-70aa11f8
ayyoob 9 years ago
parent 1c0807a513
commit 5e1ad22480

@ -50,6 +50,7 @@ if (!user) {
if (deviceTypeConfig && deviceTypeConfig.deviceType.downloadAgentUri) { if (deviceTypeConfig && deviceTypeConfig.deviceType.downloadAgentUri) {
sketchDownloadEndPoint = devicemgtProps["httpsURL"] + "/" + deviceTypeConfig.deviceType.downloadAgentUri; sketchDownloadEndPoint = devicemgtProps["httpsURL"] + "/" + deviceTypeConfig.deviceType.downloadAgentUri;
serviceInvokers.HttpClient.get(sketchDownloadEndPoint + queryString, function (responsePayload, responseHeaders) { serviceInvokers.HttpClient.get(sketchDownloadEndPoint + queryString, function (responsePayload, responseHeaders) {
if (responseHeaders) {
for (var i = 0; i < responseHeaders.length; i++) { for (var i = 0; i < responseHeaders.length; i++) {
var header = responseHeaders[i] var header = responseHeaders[i]
var headerName = String(header.getName()); var headerName = String(header.getName());
@ -58,6 +59,9 @@ if (!user) {
} }
var streamObject = new Stream(responsePayload); var streamObject = new Stream(responsePayload);
print(streamObject); print(streamObject);
} else {
return responsePayload;
}
}, function (responsePayload) { }, function (responsePayload) {
log.error(responsePayload) log.error(responsePayload)
var response = {}; var response = {};

Loading…
Cancel
Save