on 2023 Jul 23 9:01 AM
Hi,
I am leaning SAP CPI and working on HTTPS, MAIL ADAPTER in my IFLOW iflow.png. I am sending JSON body from Postman to CPI using GET get.png and I could see the request is successfully processed in CPI, but when I use POST post.png the message is not even reaching CPI.
But out of my earlier experiences POST should also be able to make a successful call to CPI.
Please let me know what am I missing here....
Hi Santosh
You likely have "CSRF Protected" checked in the HTTPS sender channel (it's the default setting). CSRF is additional security for modifying requests like POST, that the client must support. You can read more about it here. Postman supports CSRF, but for experimenting and learning you can also just turn it off.
Regards,
Morten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Santosh,
When you make the GET request, you need to provide the header key:value pair x-csrf-token:fetch. Then in the GET response there will be a x-csrf-token you can use in your POST request to overcome this error by setting the header key:value pair as x-csrf-token:<value retrieved from GET request>.
Kind regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
8 | |
8 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.