Last active
October 25, 2016 04:58
-
-
Save EeroHeroHeino/2d14f0cce2c8e1dfd3f47491f4d32c29 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// send GLOBALS.saveData to external server | |
$.ajax({ | |
url: "https://example.com:8000/post", | |
error: function(x, err){ | |
callback("Save timed out with "+err); | |
}, | |
success: function(){ | |
callback(true); | |
}, | |
type: "POST", | |
contentType: "application/json", | |
crossDomain: true, | |
timeout: 3000, // sets timeout to 3 seconds | |
data: JSON.stringify(GLOBALS.saveData), | |
dataType: "json" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment