|
Given this api deploy documentation, how would I use HTTPBuilder and Groovy to construct my query? I've tried multiple things but I'm not getting it right.
def http = new HTTPBuilder() http.request('http://artifactory:8888/libs-snapshot-local/my/jar/1.0/test-jar-1.0.jar', PUT, JSON ) { req -> body = [ uri: "http://artifactory:8888/libs-snapshot-local/my/jar/1.0/test-jar-1.0.jar", downloadUri: "http://artifactory:8888/libs-snapshot-local/my/jar/1.0/test-jar-1.0.jar", repo: "libs-snapshot-local", path: "c:\\pathtojarfile\\test.jar", created: "2012-02-03T08:37:12.599-0800", createdBy: "someuser", size: "1024", mimeType: "application/java-archive" ] response.success = { resp, json -> } } This seems to get me part way there, but it uploads an empty jar file. Seems like the body is completely ignored. Removing it produces the same result. I can't seem to find a good reference on how this is done. |
|
It seems like there is a confusion,due to the documentation layout.
The JSON object is the response Artifactory will return on successful deployment, not a JSON to send in the body.
Hope this fix the misunderstanding, we will look in clarify the documentation. Fred. On Fri, Feb 10, 2012 at 2:09 AM, petedog <[hidden email]> wrote: Given this api deploy ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Artifactory-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/artifactory-users |
|
Yes, updating the docs would be useful. It's a little confusing when it says "Sample Usage" and then has the response below. Thanks for the quick reply, it was very helpful.
|
| Powered by Nabble | See how NAML generates this page |
