Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.post("/Route/SaveTransportProperties", { properties: JSON.stringify(propArray), currTravelBox: JSON.stringify(travelBoxObj), accessToken: getAccessToken()}, function(data)
- {
- //DO STUFF
- });
- $.ajax({
- url: "mydomain.com/url",
- type: "POST",
- dataType: "xml/html/script/json", // expected format for response
- contentType: "application/json", // send as JSON
- data: $.param( $("Element or Expression") ),
- complete: function() {
- //called when complete
- },
- success: function() {
- //called when successful
- },
- error: function() {
- //called when there is an error
- },
- });
- contentTypeString
- Default: 'application/x-www-form-urlencoded; charset=UTF-8'
- $.ajax({
- url: "mydomain.com/url",
- type: "POST",
- dataType: "xml/html/script/json", // expected format for response
- contentType: "application/json", // send as JSON
- data: JSON.stringify(data),
- complete: function() {
- //called when complete
- },
- success: function() {
- //called when successful
- },
- error: function() {
- //called when there is an error
- },
- });
Add Comment
Please, Sign In to add comment