how to set json type jquery ajax
$.ajax({
type: "POST",
contentType: "application/json",
url: 'http://localhost:16329/Hello',
data: { name: 'norm' },
dataType: "json"
}); $.ajax({
type: "POST",
url: siteRoot + "api/SpaceGame/AddPlayer",
async: false,
data: JSON.stringify({ Name: playersShip.name, Credits: playersShip.credits }),
contentType: "application/json",
complete: function (data) {
console.log(data);
wait = false;
}
});
Also in JavaScript:
- react hide source code
- javascript get first 10 characters of string
- html select multiple selected values
- select class with data attribute jquery
- not getting webhook post request json data in my laravel controller
- create csv file javascript
- javascript set localstorage
- the rest operator javascript
- react check if window exists
- upload progress bar script
- add variable inside regex in javascript
- jquery basic authenticated get user
- how reliable is js hasownproperty
- javascript detect click outside element
- removing first item array js
- javascript get point of line intersection
- movement of objects in javascript
- javascript array flatten
- jquery onclick function
- javascript href on load delay
- discord function promise
- import input text material ui
- spreadjs autofit column with minimum
- get only numbers regex javascript