Description
When using lambda_runtime
it seems to be hardcoded that one's lambda handler will take JSON as input and output in JSON and it serialises the structures using serde_json
. Is it possible to configure this and esp. be able to return binary data with a specified mime type instead of "application/json"?
This would be most useful for lambdas for example responding with image/png, image/jpg and other binary types.
I also tested using lambda-runtime-client
directly as then I have control over the deserialising of the request and are able to directly output a binary blob as the response. But the header for the response is fixed to use const API_CONTENT_TYPE: &str = "application/json";
.
Have there been any thoughts of how to support and handle binary responses with other mime types?