Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: 'http://7.webcinizim.com/services/user/token.json',
- type: 'post',
- dataType: 'json',
- success: function(token) {
- console.log(JSON.stringify(token));
- $.ajax({
- url: 'http://7.webcinizim.com/services/user/login.json',
- type: 'post',
- dataType: 'json',
- data: {
- username: "tolga",
- password: "tolga123"
- },
- success: function(user) {
- console.log(JSON.stringify(user));
- $.ajax({
- url: 'http://7.webcinizim.com/services/node.json',
- type: 'post',
- dataType: 'json',
- data: 'node[type]=page&node[title]=Hede',
- success: function() {
- console.log("Node created");
- },
- error: function(err) {
- console.log(err);
- }
- });
- });
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement