Closed wangcansunking closed 4 years ago
AFAIK, there is no current way of doing this.
@wangcansunking you can specify the media type in the response e.g. - Response 200 (img/png)
however there si no way to provide an example for binary data in API Blueprint. Hint: you can also specify some metadata (headers) in the example response, these may include Content-Length
etc.
Workaround would be to return a response with the link to the binary resource.
Also you can use base64 encoding. Finally, this could be addressed in #20
Now I use redirect as the solution.
As the title saying, how can I send image with the response?