Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. $.ajax({
  2. url: 'http://www.rejicast.com/services/user/token.json',
  3. type: 'post',
  4. dataType: 'json',
  5. success: function(token) {
  6. console.log(JSON.stringify(notif));
  7. $.ajax({
  8. url:'http://www.rejicast.com/services/node/'+notif.nid+'.json',
  9. type:'put',
  10. dataType:'json',
  11. data:'node[type]=oyuncu&node[title]='+notif.title+'&node[field_goruldu][value]=1',
  12. beforeSend:function(r) {
  13. r.setRequestHeader("X-CSRF-Token", token.token);
  14. },
  15. success:function(data) {
  16. console.log("Done");
  17. }
  18. })
  19. }
  20. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement