Given this api documentation , how can I use HTTPBuilder and Groovy to build my request? I tried a few things, but I do not understand.
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 help me in part, but it loads an empty jar file. It seems that the body is completely ignored. Removing this result leads to the same result. I can not find a good link to how this is done.
stuff22
source share