Skip to Content

Consuming oData for function import using Javascript or C#

Hello Experts,

Below URL works fine from REST Client when tested but we are not able to do it in C# or Javascript.'000300000131'&IsPlant='0001'&IsWrkCtr='CENTER6'

The Get Method work fine for getting  x-csrf-token value, but using the token we are getting error for POST method.

Please provide any code snippet for using above URL which is developed using function import to POST the data using x-csrf-token value

for C# or JavaScript.

Please Suggest



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 19, 2013 at 05:51 PM

    Hi Manish,

    Here you find code for Javascript.

    You have code for

    1. Issuing Get request to fetch the csrf token

    2. Get the token value

    3. Issue a Post request.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Schepers, Thank you for pointing out that storing the cookies is the solution. It's inspiring and finally I solved the issue.