12345678910111213141516171819202122232425 |
- package main
- import (
- "io"
- "net/http"
- "os"
- )
- func main(){
- res, err := http.Get("http://192.168.1.57:8083/excel/ceshi")
- if err != nil {
- panic(err)
- }
- tem :=res.Header.Get("Content-Disposition")
- println("=============",tem)
- f, err := os.Create("D:/1.xlsx")
- if err != nil {
- panic(err)
- }
- io.Copy(f, res.Body)
- f.Close()
-
- }
|