全部博文(211)
发布时间:2018-10-31 19:47:56
一、server端处理json数据 package mainimport ("net/http""fmt""log""encoding/json")type User struct{Id stringBalance uint64}func main() {http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {var u Userif r.Body == nil {http.Error(w, "Please send a request body", 400)r.........【阅读全文】