eclipse plugin url : http://goclipse.github.io/releases/
1. recive post json data
func UserCreate(w http.ResponseWriter, r *http.Request) { result, err := ioutil.ReadAll(r.Body) r.Body.Close() if err != nil { log.Fatal(err) } fmt.Printf("%s", result) var u User json.Unmarshal([]byte(result), &u) fmt.Println(u) }
有疑问加站长微信联系(非本文作者)