Is it possible to have a different Context then gin.Context? I'am using appengine and i need to use some app engine related context
https://developers.google.com/appengine/docs/go/gettingstarted/usingusers
hey, you can't. but you do not need to. Since the app engine context is a different matter.
As you can see in the sample code:
func handler(w http.ResponseWriter, r *http.Request) {
appengineContext := appengine.NewContext(r)
the app engine context takes as argument the http.Request, right?
You can do exactly the same in Gin, since the Gin context includes the SAME http.Request.
Try this:
func handler(c *gin.Context) {
appengineContext := appengine.NewContext(c.Request)
does it make sense?
Most helpful comment
hey, you can't. but you do not need to. Since the app engine context is a different matter.
As you can see in the sample code:
the app engine context takes as argument the http.Request, right?
You can do exactly the same in Gin, since the Gin context includes the SAME http.Request.
Try this:
does it make sense?