cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to write data in OData Service

Former Member
0 Kudos

Hello

I have created a XSOData service using HANA studio and Hana Cloud Platform and am able to do GET operation using the rest client but am unable to do POST in rest client.

It throws a "403-Forbidden error".

I am using the below logic:

http://myhanadbp********trial.hanatrial.ondemand.com:443/HelloWorld/JAMOData.xsodata/Content_Details...

Operation : POST

Body :

{

  "CONTENT_ID":"6",

  "CONTENT_TITLE": "Use Case",

  "CONTENT_TYPE": "Comment",

  "CONTENT_FORMAT": null,

  "CONTENT_OWNER": "EFG",

  "CONTENT_TEXT": "What is the use case of the same?",

  "CONTENT_POST_ID": "2"

}

Authorization: SYSTEM / Password

I have not restricted the CRUD operations and have not specified any forbidden property on create/update/delete.

Thanks for your suggestions

Regards,

Kushagra

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

Did you set the prevent_xsrf flag in the .xsaccess file to true? If yes, did you set the CSRF Token in the header request?

For further info check also post .

Regards,

Florian

Former Member
0 Kudos

Hi Florian,

Thanks for the blog , it really helped me a lot.

Regards,

Kushagra

Answers (0)