cancel
Showing results for 
Search instead for 
Did you mean: 

jquery-dbg.js:10210 Failed to load resource: the server responded with a status of 403 (Forbidden)

0 Kudos
503

Hello experts,

In SAPUI5 i m trying to post data using ajax call to the my backend java. but i am getting an error forbidden 403. GET method works fine . Here i define the code.

onSaveNote: function(oEvent) { var oTextArea = oView.byId("idnote").getValue(); console.log(oTextArea); var uploadAttachUrl = "/vendorSpringRest/addnote"; var myKeyVals = { note: oTextArea }; $.ajax({ type: "POST", url: uploadAttachUrl, data: myKeyVals, contentType: 'application/json; charset=utf-8', processData: false, success: function(data) { console.log("success" + data); }, error: function(e) { console.log("error: " + e); } }); }

I tried , headers: { "X-CSRF-Token": "Fetch" } but still its not work

Accepted Solutions (0)

Answers (1)

Answers (1)

junwu
SAP Champion
SAP Champion
0 Kudos

after fetch, what you do? did you put the token in next call?