How to get and set Cookie from gin.Context?
Also, how to get User-Agent, Client's IP Address?
Use http.Request.Cookie(cookiename) to get cookie, and http.SetCookie(gin.Context.Writer, &http.Cookie) to set cookie,
You can find http header in gin.Context.Request that same as http.Request.
ok, thanks :3
ah wait, should I worry when "User-Agent" from client was sent as "user-agent" ?
would I still get the correct one when get it from gin.Context.Request?
Got an answer already, thanks :3
Most helpful comment
Use http.Request.Cookie(cookiename) to get cookie, and http.SetCookie(gin.Context.Writer, &http.Cookie) to set cookie,
You can find http header in gin.Context.Request that same as http.Request.