fcf.saveContext() function
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Stores the current context in Cookies. The context is stored in base64 encoded JSON format in the cookies parameter "fcf-context"
If the code is executed on the browser side, then the function must be called without arguments.
If the code is executed on the server side, then the function takes as an argument an Express server response object.
More information about execution context can be found at Context
Arguments
- Express server response object.
Example: Application
let server = libExpress();
server.post("/index1", (a_req, a_res) => {
fcf.setContext( new fcf.Context(a_req) );
fcf.saveContext(a_res);
a_res.send("");
});