Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: 'http://www.rejicast.com/services/user/token.json',
- type: 'post',
- dataType: 'json',
- success: function(token) {
- console.log(JSON.stringify(notif));
- $.ajax({
- url:'http://www.rejicast.com/services/node/'+notif.nid+'.json',
- type:'put',
- dataType:'json',
- data:'node[type]=oyuncu&node[title]='+notif.title+'&node[field_goruldu][value]=1',
- beforeSend:function(r) {
- r.setRequestHeader("X-CSRF-Token", token.token);
- },
- success:function(data) {
- console.log("Done");
- }
- })
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement