示例#1
0
文件: calls.go 项目: lcaballero/fluid
func SearchAll() *req.Rest {
	s := `
{
  "query": {
    "match_all": {}
  }
}
`
	return req.NewRest().OnLoopback(9200).Join("_search").Add("pretty", "").Get().Data(s)
}
示例#2
0
文件: calls.go 项目: lcaballero/fluid
func MatchAll() *req.Rest {
	return req.NewRest().OnLoopback(9200).
		Join("_count").Add("pretty", "").Get().Data(`
{
	"query": {
		"match_all": {}
	}
}
`)
}
示例#3
0
func Simple() {
	_, body, errs := req.NewRest().
		Host("www.google.com", 80).
		End()

	if errs != nil {
		fmt.Println(errs)
	}

	fmt.Println(body)
}
示例#4
0
文件: calls.go 项目: lcaballero/fluid
func Shutdown() *req.Rest {
	return req.NewRest().OnLoopback(9200).Join("_shutdown").Post()
}
示例#5
0
文件: calls.go 项目: lcaballero/fluid
func Pretty() *req.Rest {
	return req.NewRest().OnLoopback(9200).Add("pretty", "").Get()
}