1$.ajax({
2 type: "POST",
3 contentType: "application/json",
4 url: 'http://localhost:16329/Hello',
5 data: { name: 'norm' },
6 dataType: "json"
7});
1 $.ajax({
2 type: "POST",
3 url: siteRoot + "api/SpaceGame/AddPlayer",
4 async: false,
5 data: JSON.stringify({ Name: playersShip.name, Credits: playersShip.credits }),
6 contentType: "application/json",
7 complete: function (data) {
8 console.log(data);
9 wait = false;
10 }
11 });