简体   繁体   中英

SAP CPI HTTP Post how to pass token

I need to send a POST in CPI to a s4hana service, and in order to pass it directly in JSON, not in xml, I want to use the simple HTTP adapter.

How can I get the token with a GET and use it with a POST afterwards?

do the GET, parse the XML and save the token as a variable in message header. Use the message header variable in your POST via filling the JSON with ${header.yourVariableName}

see this: https://blogs.sap.com/2018/01/18/sap-cpi-clearing-the-headers-reset-header/ http://blog.whint.de/runtime-variables-cpi/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM