These are chat archives for gin-gonic/gin
Gin is a web framework written in Golang. It features a Martini-like API with much better performance -- up to 40 times faster. If you need smashing performance, get yourself some Gin.
c.GetRawData()works too, the way I print the byte value is wrong.
required. I think it’s easier just sending a
string “0”instead of int. So I modifed my int to string and then everything work fine.
c.ShouldBindJSONfirst and bind failed with an error? Can I somehow log the problematic request body? I will not always need the body. When the BindJSON succeeds, it’s ok to ignore the request body. But when it failes, I am wondering if I can log it. Thanks a lot.
BindJSONline and dump the request using
ioutil.ReadAll^^ I don't know if there's a simple way of "attempting to bind JSON and if that fails, display the query"