Hi
We call a webservice and the content-type of the response is "image/png" and the content-disposition is 'attachment; filename= "snapshot.png'. In Postman the Image will be shown in the "Body"-Tab after the successfull call of the webservice.
I try now to do this with the Servoy "plugins.http" and to store the content in a file, so I can store it somewhere (file or db).
The webservice works so far, but I dont know how to handle the response. response.getMediaData() returns null, but response.getResponseBody() returns a String that starts with "PNG\r\n........".
What do I have to do now with this String? How do I have to "convert" it, so I can store it in a file?
I've tried to write it down with "plugins.file.writeTXTFile". This create a file that is exactly as large as if I story the response in Postman but there are a few special characters in the file that looks different. So obiously there are some "encoding" issues.
Any ideas will be very appreciated.
Best
Roland