liuxiaolong
2019-12-17 c0d6c90c5539073ac7f58f1f68699cfb946c47a6
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
}