문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top