Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var httpRequester = (function () {
- getJSON = function (url, success, error) {
- $.ajax({
- url: url,
- type: "GET",
- contentType: "application/json",
- timeout: 5000,
- success: success,
- error: error
- })
- };
- postJSON = function (url, data, success, error) {
- $.ajax({
- url: url,
- type: "POST",
- data: JSON.stringify(data),
- contentType: "application/json",
- timeout: 5000,
- success: success,
- error: error
- })
- }
- return {
- getJSON: getJSON,
- postJSON: postJSON
- }
- }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement