res, err := goreq.Request{
Method: "POST",
Uri: conf.USERSYNC,
Body: json,
}.Do()
我想问一下json数据如何定义?
更多评论
type DoctorData struct {
TableName string
TalbeName2 string
Data string `orm:"type(text)"`
Data2 Doctors
}
res, err := goreq.Request{
Method: "POST",
Uri: conf.USERSYNC,
Accept: "application/json",
ContentType: "application/json",
Body: DoctorData{"User", "Doctor", contents, doc},
}.Do()
接口接收到的参数为
{"TableName"=>"User", "TalbeName2"=>"Doctor"......}
如何让传递的接收的参数为table_name table_name2 ......
#1