Domanda

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

È stato utile?

Soluzione

I got the solution.Added header Cookie and its working fine.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top