When to use context.session

Not applicable

From the javascript object model doc (http://docs.apigee.com/api-services/reference/javascript-object-model), there are two ways to pass objects to different policies: via custom variable or context.session. All the other documents I've read mostly just use custom variables. What is the use case for using context.session? Any advantage or tradeoffs with context.session?

Thanks,

-Wei

Solved Solved
0 4 1,039
1 ACCEPTED SOLUTION

Hi @Wei Shen

Please take a look at this post. Explains when you could use context.session. Its an example of running Async http callouts using JS policy.

View solution in original post

4 REPLIES 4

Hi @Wei Shen

Please take a look at this post. Explains when you could use context.session. Its an example of running Async http callouts using JS policy.

HI @Wei Shen

Did that help or are you looking for any other info ?

If that helps, please accept the answer so that it can be useful for others looking for similar posts in the community

Thanks, @Sai Saran Vaidyanathan . It helps! I assume the context.session object also available between normal flow and error flow. correct?

Thats correct @Wei Shen