getResponseBody() returns a string getMediaData() is null
Posted: 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.
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.