Open wangjia184 opened 2 weeks ago
Hi
I want to implement an API to return an image as raw binary. Content-type should be image/png . So when this API is opened in web browser, the image is presented.
image/png
After reading the example https://github.com/juhaku/utoipa/blob/d020f92a0446adc7e99999aa9e1be63e95728fbb/examples/rocket-todo/src/main.rs, I still don't find a way.
The IntoResponses and ToResponse traits seems does not allow to return raw binary body?
IntoResponses
ToResponse
Hi
I want to implement an API to return an image as raw binary. Content-type should be
image/png
. So when this API is opened in web browser, the image is presented.After reading the example https://github.com/juhaku/utoipa/blob/d020f92a0446adc7e99999aa9e1be63e95728fbb/examples/rocket-todo/src/main.rs, I still don't find a way.
The
IntoResponses
andToResponse
traits seems does not allow to return raw binary body?