cancel
Showing results for 
Search instead for 
Did you mean: 

Post method in SAP Appgyer

ratnarajesh_de
Explorer
0 Kudos

Dear Team,

Do we have an update on using of Post method (Create or Update ) for an ODATA Service in SAP Appgyer.

PS : Is this the only forum to ask questions or do we have any other forum

Thanks!

Ratna Rajesh P

Accepted Solutions (0)

Answers (3)

Answers (3)

ilya-belozerov
Employee
Employee
0 Kudos

Hello Ratna,

we have a mock server provided with the OData V2/V4 endpoints: https://github.com/SAP-samples/cloud-extension-ecc-business-process/blob/mock/README.md

You can deploy it locally or in Cloud Foundry environment and use in SAP Build Apps / AppGyver Classic. The endpoints there do not have a CSRF protection as S4HANA endpoints have. If you want to simulate full S4HANA Experience you should change the code as it's described here: https://cap.cloud.sap/docs/node.js/best-practices#manual-implementation

You can also fetch a CSRF token from AppGyver via JS Code (e.g. like here https://forums.appgyver.com/t/x-csrf-token-sap-api-post-request/11475/14) but I would recommend to wait till this is fixed in the next release.

Best Regards,

Ilya

beapasch
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ratna,

I just learned that there is a new issue: CSRF token retrieval works fine for the OData V2 services. But for OData V4 it gets an error on HEAD method execution: "405 Method not supported".
I will provide an update as soon as we have a solution available.
Kind regards, Bea

ratnarajesh_de
Explorer
0 Kudos

Hi Bea,

Thanks for the response , do we have sample Odata V2 Service which i can use to Post data.

Do we have some blog or information of how to pass the CSRF token to the Post method - in Appgyer create method Flow Function or http request flow function.

Best Regards,

Ratna Rajesh P

beapasch
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Ratna,
the issues was solved and you should be able to use the POST method now.
Kind regards,
Bea

ratnarajesh_de
Explorer
0 Kudos

Thanks Bea for response,

I have tried now, I get 405 Error .

I have used the Create button on the browse button.

And I get the Error :

Do we have a blog or steps how we can use create or update a record .

1) I have tried the options , https request flow function

2) API management

3) And with BTP destination .

nothing works and its not good if we cannot update or create record , any leads would be helpful.

Thanks!

Ratna Rajesh P