I’m receiving the response from an API using java, and I’m receiving ‘Raw’ format type as the response. However when I’m using Postman, I’m able to receive the response in 3 formats and able to switch between the formats. Attaching the screenshot.
Before I didn’t mention the content-type, now I have added content-type as base64, hence receiving the same response. I tried in my java code as well, still receiving the RAW data.
Hey @epraj94, the API you are calling is returning the response in that format. Is that an API you created? If so, you would need to update the implementation to return the binary data as base64 encoding.
If you don’t own that API, maybe you can look at the docs and see if they have a flag or parameter you can provide to change the response type.
Hey @epraj94 , From your response Header it seems like you are receiving image/jpeg. I dont think you can convert or validate the received raw image content.
Please elobrate on what exactly you are looking for.
I don’t own that API. Its an external API, and I’m consuming that API. I have also checked the docs, where they were not having any flags to change the format type. It seems I need to download the data as a file and convert it into Base64 format.