I have to append parameter in JSON response after request processing is completed and before sending. I can do in after exec
filter. Here I defined filter like this,
beego.InsertFilter("*", beego.AfterExec, AddRequestAfterExec, false)
Now in this AddRequestAfterExec
method, I am unable to read JSON response. I need to read JSON response and add parameter to it. I searched many things, but did not find any thing useful. So far I have left it empty.
func AddRequestAfterExec(c *context.Context) {}
Can anybody help, how to read Response in this function and modify it?
Also I am sending response from API controller like this
authController.ServeJSON()