func GetXXX(ctx *gin.Context){ uri:= http://xxxx.com client := &http.Client{} fmt.Println(uri) req:= GetInfo(uri) resp, err := client.Do(req) if err != nil { fmt.Println(访问接口出错) } body := resp.Body defer body.Close() //将接口传回的数据直接返回给前端 io.Copy(ctx.Writer, body) } func GetInfo(url st