From a Python Flask API, I want to return an image stream and also some text in a single API response.
Something like this:
{
'Status' : 'Success',
'message': message,
'ImageBytes': imageBytes
}
Also, I would like to know what would be the best format to use for imageBytes
, so that the client applications (Java / JQuery) can parse and reconstruct the image.
If the above approach is not correct, please suggest a better approach.