liuxiaolong
2019-11-22 8388f4c57b9557c81477f4a8cc3d2196127558a7
extend/esutil/EsClient.go
@@ -303,3 +303,18 @@
   }
   return sources, nil
}
func HttpGet(str string) ([]byte){
   resp, err :=   http.Get(str)
   if err != nil {
      // handle error
   }
   defer resp.Body.Close()
   body, err := ioutil.ReadAll(resp.Body)
   if err != nil {
      // handle error
   }
   return body
}