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
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
Handling of binary (not-textual) data is a known pain point in vRO. There could be some clever workarounds for specific use cases, but the real fix should be done in the platform at some point.
I'm not aware of another HTTP plug-in available, and I'm not sure this can be fixed purely on plug-in level.
BTW, currently we have an open support request that is similar to this case. Curious to see what the guys working on it will come up with