golang http 文件下载
golang http 文件下载 golang + gin 1 2 3 4 5 6 7 8 9 c.Writer.WriteHeader(http.StatusOK) c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=%s.bin", "foo")) c.Header("Content-Type", "application/octet-stream") c.Header("Content-Transfer-Encoding", "binary") c.Header("Accept-Ranges", "bytes") c.Header("Connection", "keep-alive") c.Header("Content-Length", fmt.Sprintf("%d", len(paramsBytes))) c.Writer.Write(paramsBytes) vuetify 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 import fileDownload from 'js-file-download' exportCsv (): void { Axios.get('/export', { headers: { Authorization: