on 09-17-2013 11:19 AM
Hi
I have created a query where I got a list of entry sheets.
Actually I want to creat a new entry sheet, but I am not allowed to do that, as I got the error "CSRF token validation failed".
I did find this thread, where I am told to call a query first, and then do my post. But it still gives me the CSRF token error.
http://scn.sap.com/thread/3361661
My query GET url looks like this:
http://xxxx.xxx.xxx:yyyy/sap/opu/odata/sap/ZGW_TEST_SES_SRV/EssList/?$filter=PO_NO eq 'FSP0235016'
I got a list - and it works fine.
My CREATE url looks like this:
http://xxxx.xxx.xxx:yyyy/sap/opu/odata/sap/ZGW_TEST_SES_SRV/EssList('123')
and here I got the error.
We are using Odata in our ICF Node.
Anyone who can give me some hints?
Thanks
Aikon
Hi Aikon,
Follow the steps.
1. In the first GET call you need to add HTTP Request header 'X-CSRF-Token' and value 'Fetch'.
When you get the response back, check the value for header 'X-CSRF-Token, copy this value. Check the following screenshot for this mentioned step
2. In the POST request you need to to add HTTP request header 'X-CSRF-Token', value will be the value that you received in last step. Check the screenshot for this step
This time server will accept the CSRF Token.
Please note I am using Advanced Rest Client for Chrome for this test.
Regards,
Atanu
Message was edited by: Atanu Mallik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.