golang POST bodyの受け取り方
ObjectにBindすればよい
fmt.Println("Handle Data") p := new(RequestBody) if err := c.Bind(p); err != nil { fmt.Println("ERROR") log.Printf("err %v", err.Error()) return c.String(http.StatusInternalServerError, "Error!") }
ObjectにBindすればよい
fmt.Println("Handle Data") p := new(RequestBody) if err := c.Bind(p); err != nil { fmt.Println("ERROR") log.Printf("err %v", err.Error()) return c.String(http.StatusInternalServerError, "Error!") }