Thanks Thomas and Sreehari,
I would FETCH the CSRF token via GET and retreive the CSRF token in Response header and then use the same value and set in the request header from the UI screen for the POST operation. With CSRF token I also set the cookie for session id.
If I fetch the CSRF token like how Thomas described above it works but I'm trying to figure out if I can pass this fetched CSRF from the UI and do a POST call...So I feel if instead of setting the cookie session id in the UI and passing the same to XSJS I would try to create a cookie in the XSJS and then send.
Thanks again for the reply..!!!!