Hi guys
I'm trying to save the result of an HTTP rest API request to a mime file but the file result is not correct.
I performed a dynamic HTTP request to get the package content:
"vco/api/packages/" + packageName
With header
request.setHeader("Accept-Encoding","gzip, deflate")
request.setHeader("Accept", "application/zip")
request.setHeader("Content-Type", "application/zip;charset=utf-8")
And get the result by the method "contentAsString" of object "RESTResponse",
Then create a mimeFile like :
var mimeAttachment = new MimeAttachment()
mimeAttachment.mimeType = "application/zip"
mimeAttachment.name = packageName + ".package"
mimeAttachment.content = response.contentAsString
I suspect that the "contentAsString" method doesn't support this case.
My goal is to export a vRO package to a file by REST API (I know its possible by PowervRO, but I would like to do this without using a windows Powershell host)
Does anybody has already done this task or does exists a another HTTP plugin to perform this task ?
Thanks a lot for your answers
Jacques