cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to Fetch X-CSRF-Token using the HTTP Request Flow Function in AppGyver

AnjalyGeorge
Explorer
0 Kudos

Hi All,

I am trying to send a POST request to my SAP system, for which I need a X-CSRF-Token.
I am using the HTTP Request Flow function. I could see in the developer tool the x-CSRF-Token is fetching correctly, But as the response of Flow function I am getting Response Header as empty . I have tried assigning the response to a variable using Formula
outputs[“HTTP request”].resHeaders.map[‘x-csrf-token’].This also didn’t worked.
Can someone help me to solve the issue.

Thanks,
Anjaly

babuilyas
Participant
0 Kudos

X-CSRF-Token token is fetched with GET method only.

AnjalyGeorge
Explorer
0 Kudos

Yes I tried HTTP Response GET only with headers Authorization object and X-CSRF-Token. With the response from GET I am trying to do POST.

0 Kudos

Hey, found and fixed the issue with the `resHeaders` - there will be update to the flow function later today.

Thanks,

Kristian Gerkman from SAP AppGyver

LJ1
Explorer
0 Kudos

did you sorted out this issues? I have same now ...

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member656694
Participant
0 Kudos

As an alternative approach, you shall try the regular js function to get the x-csrf-tocken.

FYI, seamless BTP destination & authentication service integration in roadmap of Q1 2022.

https://roadmaps.sap.com/board?range=2022Q1-2022Q3&PRODUCT=73554900100800003801#Q1%202022