Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Canvas now enables you to configure the parameters that can be passed in the header of a request. This helps in sending data to a web service that expects a key or information in the header to return a response for a request.

In the Request JSON Configuration field, provide the inputs as follows for the header of the request.

Example,             param$header  : $session.param

In the above example, "param" can be any parameter that you want to pass in the header. "$header" is the header object to pass the data in it. "$session" is the session object where you are accessing the data value from. ".param" is the parameter available in the session that you want to fetch and set in the header.

For example, if you want to pass User ID of a user in the header, you can fetch the User ID from any of the predefined objects such as request, session, extraParam etc. that contain the value and pass it in the header in the following format. Refer Canvas Reserved Keywords and Predefined Objects for more details.

Example,             UserID$header : $session.UserNo

You can pass second level data to the header using customSessionInfo.

Example,             AuthToken$header : $customSessionInfo.UserToken

The following are canvas provided parameters for the predefined objects; session and user. The implementation teams can use these parameters to pass the data in the header.

sessionuser

sessionId

owningGCIF

deviceType

currentGCIF

channelId

userNumber

hybridAppFlag

loginId

simulatedFlag

userType

simulatingUserLoginId

firstName

requestingClientIP

middleName

browserName

lastName

osName

mobileNumber

sessMode

emailId

usrAgent

customerSegmentCode

sessInfoData

currentRoleId

sessionCache



corpRoles

corpRoleDescriptions

authenticationType

The data entered by end-users from client side can be captured and stored as extraParams and be sent as header params. The following snippet is a sample code to achieve that. 

CWEH.registerHandler('TEST_APP', CWEC.EXTRA_PARAMS_HDLR, function(scope) {

scope['loan_type'] = 'HOME_LOAN';

});

You can pass header parameters to GET and POST requests and for operations such as publish, update, fetch or to pass through a filtered layer to connect a web service.

  • No labels