on 2021 Feb 23 10:54 AM
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
Request clarification before answering.
after fetch, what you do? did you put the token in next call?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
9 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.