Пример #1
0
func do(request *restful.Request, response *restful.Response) {
	u := &user{}
	err := request.ReadEntity(u)
	if err != nil {
		log.Printf("should be no error, got:%v", err)
	}
	log.Printf("got:%v", u)

	ur := &userResponse{Status: statusActive}

	response.SetRequestAccepts(MIME_MSGPACK)
	response.WriteEntity(ur)
}