not success. I found that there are 2 options for using api key for authentication and download file from artifactory:
1) curl -uadmin:API-Key -ocommons-collections-3.1.jar http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collect...
2) curl -H "X-JFrog-Art-Api: API-Key" -ocommons-collections-3.1.jar http://localhost:8081/artifactory/jcenter/apache-collections/commons-collections/3.1/commons-collect...
I tried the 2) in script below because of the use of header, but it didnt download the file, but some strange character which I posted at below. I 'm not sure where it went wrong.
temp.log file with information below instead of the content from the url
<!doctype html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><meta name=importmap-type content=systemjs-importmap><link rel=apple-touch-icon sizes=180x180 href=./apple-touch-icon.png><link rel=icon type=image/png sizes=32x32 href=./favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=./favicon-16x16.png><link rel=mask-icon href=./safari-pinned-tab.svg color=#f5f5f2><link rel="shortcut icon" href=./favicon.ico><link rel=stylesheet type=text/css href=/ui/webapp/css/vendorStyles.css><link rel=stylesheet type=text/css href=/ui/webapp/css/application.css><script type=systemjs-importmap src=/ui/imports-map/imports.json></script><script src=/ui/externals/import-map-overrides/dist/import-map-overrides.js></script><script src=/ui/externals/systemjs/dist/s.min.js></script><script src=/ui/externals/systemjs/dist/extras/amd.min.js></script><script src=/ui/externals/systemjs/dist/extras/named-exports.min.js></script><link rel=preload href=/ui/externals/vue/dist/vue.min.js as=script><link rel=preload href=/ui/externals/vue-router/dist/vue-router.min.js as=script><link rel=preload href=/ui/externals/jfrog-ui-essentials/dist/jfrog-ui-essentials.umd.min.js as=script><link rel=preload href=/ui/externals/single-spa/lib/umd/single-spa.min.js as=script><base href=/ui/ ><title>JFrog</title><style>@keyframes heartbeatOut{from{opacity:1}50%{opacity:0;transform:scale(.8)}to{opacity:0;transform:scale(.8)}}@keyframes heartbeat{from{transform:scale3d(1,1,1)}50%{transform:scale3d(1.15,1.15,1.15)}to{transform:scale3d(1,1,1)}}.pounding-heart-container{display:none;align-items:center;justify-content:center;position:absolute;left:0;right:0;top:0;bottom:0;z-index:9999999999;background:linear-gradient(132.49deg,#414857 14.17%,#252831 83.36%)}.pounding-heart-container.show-splash{display:flex}.logo{width:130px;-webkit-backface-visibility:hidden;-ms-transform:translateZ(0);-webkit-transform:translateZ(0);transform:translateZ(0)}.logo.pulse{animation:heartbeat 1.7s infinite}.logo.zoom-out{animation:heartbeatOut 150ms forwards}</style><link href=/ui/css/app.4de23844.css rel=preload as=style><link href=/ui/css/chunk-vendors.cee239a1.css rel=preload as=style><link href=/ui/js/app.3b20d340.js rel=preload as=script><link href=/ui/js/chunk-vendors.61f2dc48.js rel=preload as=script><link href=/ui/js/preloader.31ea7863.js rel=preload as=script><link href=/ui/css/chunk-vendors.cee239a1.css rel=stylesheet><link href=/ui/css/app.4de23844.css rel=stylesheet></head><body><div class="pounding-heart-container show-splash"><img class="logo pulse" src=/ui/img/jfrog.8f770bff.svg></div><noscript><strong>We're sorry but jfrog webapp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/ui/js/chunk-vendors.61f2dc48.js></script><script src=/ui/js/app.3b20d340.js></script><script src=/ui/js/preloader.31ea7863.js></script></body></html>
request = NewHTTPRequest(
URL( "http://http://docker-virtual.artifactory.xxx.com:80/ui/repos/tree/General/Sxxxx/logs/ABC/1111_23456_1_test.zip/test.log" ),
Method( "GET" ),
headers({"X-JFrog-Art-Api: API-Key"})
);
zip = request << download("D:\temp.log", "replace", "show_progress");