how to collect text data from response

Hi,

I am using serviceCalloutPolicy to get response from some "xyz" api. The response returned by "xyz" api is text data like "abnfhjdkdhrju784hhkfjhbbhg21g3u2u9fdjkfnfddsnrijirry3784yewrgshbsdjbcjsvnvksdnv" which is neither json nor xml . so how can extract this data into variable. I want to use this data as header in another api call.

0 2 279
2 REPLIES 2

By default the Service callout response is stored in calloutResponse.content variable.

If you modified the Response tag in Service callout policy, then that variable should be used.

Not applicable

@Parimal Andhalkar if you want to extract full response "calloutResponse.content" is the variable you can directly make the header in assign message policy.

if you want a part of the text response then you can use javascript policy and get the full response from the above variable and then you can use some javascript code to get the particular value you need and then assign to the header.