In the Jenkins REST API, you create a new job by posting a config.xml to
http://server_url/createItem?name=NewJobName

Using an existing template file was easy enough:
ZnClient new
        url: restUrl;
        queryAt: 'name' put: aString;
        uploadEntityFrom: '/path/to/config.xml';
        contentType: ZnMimeType applicationXml.
client post.

But what's the equivalent for using a string representing the file contents?
I tried:
contents: JenkinsConfigFile new contents;
and
entity: (ZnEntity text: JenkinsConfigFile new contents);
but neither seemed to work... (500 error on the server)



-----
Cheers,
Sean
--
View this message in context: 
http://forum.world.st/Zinc-Posting-aString-tp4693047.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Reply via email to