Hi,
I would like to ask help in my problem. I would like to add another
action in my controller, its mostly a wrapper to an existing one.
e.g.
def newRestCall = oldRestCall
def oldRestCall
Naturally I want to do something in between newRestCall and
oldRestCall. More specifically decrypting the posted message on
newRestCall, add something to Json before passing it to the
oldRestCall.
I am reading this to help me, however unable to further progress forward.
http://www.playframework.com/documentation/2.1.0/ScalaActionsComposition
http://www.playframework.com/documentation/2.1.0/ScalaBodyParsers
It seems action composition I can't change the body anymore? As I
would like to decrypt body in newRestCall and create a json request
before giving it to oldRestCall.
While on the body parsers, I don't know how to use the oldRestCall
after changing the body.
I guess I can refactor it so newRestCall and oldRestCall can share
some common code. However its really just a transform and call
oldRestCall what I am after. I really would appreciate if someone can
tell me which one to use and I guess just a basic example. Thanks.
Jun