510aadc99430e067b538967e28281d7bdea82661.svn-base 328 B

123456789101112131415161718192021222324
  1. package main
  2. import (
  3. "io"
  4. "net/http"
  5. "os"
  6. )
  7. func main(){
  8. res, err := http.Get("http://192.168.1.57:8083/excel/ceshi")
  9. if err != nil {
  10. panic(err)
  11. }
  12. tem :=res.Header.Get("Content-Disposition")
  13. println("=============",tem)
  14. f, err := os.Create("D:/1.xlsx")
  15. if err != nil {
  16. panic(err)
  17. }
  18. io.Copy(f, res.Body)
  19. }