guonaihong / gout

gout to become the Swiss Army Knife of the http client @^^@---> gout 是http client领域的瑞士军刀,小巧,强大,犀利。具体用法可看文档,如使用迷惑或者API用得不爽都可提issues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

支持Bind多个对象

Asterism12 opened this issue · comments

	var responseStruct struct {
		Name string `json:"name"`
		Age  int    `json:"age"`
	}
	var responseStr string

	gout.GET("url").
		SetQuery(gout.H{}).
		BindJSON(&responseStruct).
		BindBody(&responseStr).
		Do()

	log.Println(responseStr)
	// do something with responseStruct ...

可以.我想想怎么实现...

用下v0.3.0版本。这个issue先关闭了。。。有问题可再打开。