I got the solution.Added header Cookie and its working fine.
Fetch token and post a webservice
-
29-06-2022 - |
Vra
I have a webservice written in Net Weaver gateway. I need to POST
a data for which first I have to fetch an x-csrf-token
. I am getting that token by a GET
method. Upto there my code is working fine. But when I have to send the data using POST
with the fetched x-csrf-token
I am getting InvalidOperation
exception or 403 bad request.
I want to remind you that the webservice is working fine in the RestClient of firefox, so there is no issue with webservice request. Also I want to pass the token as a header field in the POST
call. So fetching token is a must. Token is dynamically generated and cannot be hardcoded.
I can share code if anyone needs to see it. Code is for WINDOWS mobile 6.5
Oplossing
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow