Last active
January 22, 2018 16:40
-
-
Save BilalQadri/68b70da28a66eb73341acca83101722f to your computer and use it in GitHub Desktop.
Biwascheme PUT/POST/DELETE method
This file contains hidden or 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
define_libfunc("http-post-call", 2, 2, function(ar){ // path , data and method (post/put/delete) | |
var path = ar[0]; | |
assert_string(path); | |
var data = ar[1]; | |
var method = ar[2]; | |
return new BiwaScheme.Pause(function(pause){ | |
$.ajax({ | |
url: path, | |
type: method, | |
data: data, | |
processData: false, | |
contentType: false, | |
success: function(data) { | |
pause.resume(data); | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment