To my shame, I have not been able to figure out how to get data from the frontend in Gin framework. In Django I get data So:
user=request.data.get('user')
print(user)
Everything is simple and understandable as day. How should I do it in gin?
user := c.Query("user")
user := c.Param("user")
user := c.Params.ByName("user")
user := c.PostForm("user")
println(user)//emptiness....
Server GIN can't handle routine default application/json requests from axios!!! What??? Requests should be sent as application/x-www-form-urlencoded. My decision in Vue project: Use vue-resource instead axios (axios.post=>this.$http.post) with option Vue.http.options.emulateJSON = true; in main.js