on 06-22-2016 12:06 PM
I have service hosted on SAP server, and GET call is working fine.
I need to do POST call using oModel.Create() call. Issue is that Create works in Rest client where i have to do a get with X-CSRF-Token and then i have to do POST using fetched token.
In UI5 app, read does not return any token, I read documentation and it said, oDataModel takes care of X-CSRF-Token.
I need help with sample code to see how oModel.create() can work in my case?
Hi Rohit,
To perform a create service i think no need of tokens,for example:
var json = {"name1","name2"} //required json file to post
oModel.create("/entityset",json,null,function(success){
alert("success")
},
function(error){
alert("error")
}
); //end of create
if this is not u r requirement please reply back.
Are you getting any error? please post the error.
Thanks,
Deepak Raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
7 | |
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.