liuxiaolong
2019-11-20 c070c02f3fcb8c2c8dfa1ffcadf72a4fb827a43a
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
}