cancel
Showing results for 
Search instead for 
Did you mean: 

How to send http status code using Cloud platform integration

ShikhaG
Participant
0 Kudos

Hi All,

Can some one please tell me that how can i send the http status code using SAP CPI. I have created a i flow in cpi which is connected with RSA to create user profile in AD. this is a http call. Now the RSA side i want to send the http codes like 200, 401 etc . can some please help me here. Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

manoj_khavatkopp
Active Contributor

Hi Shikha ,

You can set the Header: CamelHttpResponseCode with any desired value i.e 201,400 etc using a content modifier or script.

Thanks,

Manoj

ShikhaG
Participant
0 Kudos

Thanks Manoj. What should be tha value for this configured header. My requirement is to dynamically capture the http status code while my integration is triggered via a sender http adapter

manoj_khavatkopp
Active Contributor
0 Kudos

Assuming you are using request reply to call to AD , use content modifier after the call you can read the http status code via : CamelHttpResponseCode and assing the same back to CamelHttpResponseCode and you can set your predefined response. In case of error, you need to capture code via script inside the exception subprocess, refer this link ofr code.