How to configure Swagger so that Excel can be downloaded successfully?

does anyone know how to configure Swagger to support downloading Excel?

clipboard.png

: can"t be opened for some reason

: Flask + flasgger




clipboard.png

Mar.13,2021

you should set the Accept of the request to application/octet-stream .
this is really strange, because normally the Accept of Excel files is application/vnd.ms-excel .
but since flasgger uses swagger-ui as the front end, Swagger sends file class requests using superagent , using blob technology, and needs to set xhr's ResponseType to blob .
We see flasgger_static/lib/http.js :

.
   

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c1b2a7-548e5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c1b2a7-548e5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?