The front end uses get request to do an export download function, how to add request header data?

clipboard.png

the backend gives a get request for export and download. Originally, there is no problem with the download function, but then a token, needs to be added to the request header with Authorization: token,. How to add the request header information with the window.open get address?

Jan.08,2022

window.open cannot modify the request header. If it is a download function, you can send a get request and let the server set the response header format. If Content-Type, is set to application/octet-stream, browser, it will download

by default.
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-1e5fce9-44516.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-1e5fce9-44516.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?