func SearchAll() *req.Rest { s := ` { "query": { "match_all": {} } } ` return req.NewRest().OnLoopback(9200).Join("_search").Add("pretty", "").Get().Data(s) }
func MatchAll() *req.Rest { return req.NewRest().OnLoopback(9200). Join("_count").Add("pretty", "").Get().Data(` { "query": { "match_all": {} } } `) }
func Simple() { _, body, errs := req.NewRest(). Host("www.google.com", 80). End() if errs != nil { fmt.Println(errs) } fmt.Println(body) }
func Shutdown() *req.Rest { return req.NewRest().OnLoopback(9200).Join("_shutdown").Post() }
func Pretty() *req.Rest { return req.NewRest().OnLoopback(9200).Add("pretty", "").Get() }