getResponseBody() returns a string getMediaData() is null

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

getResponseBody() returns a string getMediaData() is null

Postby roddy » Mon Jul 05, 2021 12:45 am

When using an HTTP GET request to retrieve a PDF from an AWS S3 bucket, I can only retrieve the data using getResponseBody() which returns it as a string (not so good) but the getMediaData() is only returning null. I thought it would be an interpretation of the same data?

Using plugins.http.getMediaData() works fine but if there is an exception then it bypasses the try/catch and just crashes the app (it sometimes appears as an exception later).
If anyone could shed any light on the reasons a getMediaData() will only return null, even when there is data coming back from the getResponseBody(), it would be very much appreciated.
Posts: 100
Joined: Mon Oct 26, 2020 12:32 am

Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 6 guests