{"action":"created","issue":{"url":"https://api.github.com/repos/gin-gonic/gin/issues/401","labels_url":"https://api.github.com/repos/gin-gonic/gin/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/gin-gonic/gin/issues/401/comments","events_url":"https://api.github.com/repos/gin-gonic/gin/issues/401/events","html_url":"https://github.com/gin-gonic/gin/issues/401","id":99967304,"number":401,"title":"Print Request Body empty","user":{"login":"tihuinc","id":56404,"avatar_url":"https://avatars.githubusercontent.com/u/56404?v=3","gravatar_id":"","url":"https://api.github.com/users/tihuinc","html_url":"https://github.com/tihuinc","followers_url":"https://api.github.com/users/tihuinc/followers","following_url":"https://api.github.com/users/tihuinc/following{/other_user}","gists_url":"https://api.github.com/users/tihuinc/gists{/gist_id}","starred_url":"https://api.github.com/users/tihuinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tihuinc/subscriptions","organizations_url":"https://api.github.com/users/tihuinc/orgs","repos_url":"https://api.github.com/users/tihuinc/repos","events_url":"https://api.github.com/users/tihuinc/events{/privacy}","received_events_url":"https://api.github.com/users/tihuinc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-10T04:16:38Z","updated_at":"2015-08-13T04:44:12Z","closed_at":"2015-08-13T04:44:12Z","body":"I'm new to Go and Gin, and am having trouble printing out the full request body.\r\n\r\nI want to be able to read the request body from third party POST, but I'm getting empty request body.\r\n```\r\ncurl -u dumbuser:dumbuserpassword -H \"Content-Type: application/json\" -X POST --data '{\"events\": \"3\"}' http://localhost:8080/events\r\n```\r\n\r\nMy entire code is as follow. Any point is appreciated.\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n  \"net/http\"\r\n  \"fmt\"\r\n  \"github.com/gin-gonic/gin\"\r\n)\r\n\r\nfunc main() {\r\n  router := gin.Default()\r\n  authorized := router.Group(\"/\", gin.BasicAuth(gin.Accounts{\r\n     \"dumbuser\": \"dumbuserpassword\",\r\n  }))\r\n  authorized.POST(\"/events\", events)\r\n  router.Run(\":8080\")\r\n}\r\n\r\nfunc events(c *gin.Context) {\r\n  fmt.Printf(\"%s\", c.Request.Body)\r\n  c.JSON(http.StatusOK, c)\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/gin-gonic/gin/issues/comments/130533806","html_url":"https://github.com/gin-gonic/gin/issues/401#issuecomment-130533806","issue_url":"https://api.github.com/repos/gin-gonic/gin/issues/401","id":130533806,"user":{"login":"tihuinc","id":56404,"avatar_url":"https://avatars.githubusercontent.com/u/56404?v=3","gravatar_id":"","url":"https://api.github.com/users/tihuinc","html_url":"https://github.com/tihuinc","followers_url":"https://api.github.com/users/tihuinc/followers","following_url":"https://api.github.com/users/tihuinc/following{/other_user}","gists_url":"https://api.github.com/users/tihuinc/gists{/gist_id}","starred_url":"https://api.github.com/users/tihuinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tihuinc/subscriptions","organizations_url":"https://api.github.com/users/tihuinc/orgs","repos_url":"https://api.github.com/users/tihuinc/repos","events_url":"https://api.github.com/users/tihuinc/events{/privacy}","received_events_url":"https://api.github.com/users/tihuinc/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T04:44:12Z","updated_at":"2015-08-13T04:44:12Z","body":"Thanks, ironiridis, I figured it out with help from Stackoverflow too.\r\nThread here: http://stackoverflow.com/questions/31911579/gin-golang-empty-req-body."}}