Hi,
I'm trying to download artifacts from our repository to a directory, again
using groovy and the REST API. Could you please have a look at my code:
// uri was set by previous script part to
//
"http://mic-build2.mic.co.at:8081/artifactory/features-qa-test-snapshot/at/mic/tariff/feature/at.mic.tariff.feature/20130320003416/at.mic.tariff.feature-20130320003416-win32.win32.x86.zip"
def server = new RESTClient()
server.headers['Authorization'] = 'Basic '+ (config.user + ':' +
config.pwd).getBytes('iso-8859-1').encodeBase64()
def res =server.get(uri: "$uri")
Get seems to work but writes to the log:
WARNING: Cannot find parser for content-type: application/zip -- using default
parser.
After execution the variable res contains a
groovyx.net.http.HttpResponseDecorator@1a5e68a
res.contentType() is application/zip
So it seems that get works properly - but I'm missing something to get the get
result as a zip file to my target directory. Unfortunately the documentation of
Retrieve
Artifact<http://wiki.jfrog.org/confluence/display/RTF/Artifactory%27s+REST+API#Artifactory%27sRESTAPI-RetrieveArtifact>
doesn't help.
Thanks again for your help!
Kind regards!
Frank
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users