Fix m.request/m.jsonp to not mutate arguments, simplify code (#2288)
I basically recast it to remove 99% of the duplication. They're basically the same function mod how they fire their requests and append query parameters.
This commit is contained in:
parent
eee2c1b032
commit
7cbc15e7a2
3 changed files with 97 additions and 111 deletions
|
|
@ -11,7 +11,9 @@ module.exports = function() {
|
|||
return {status: 500, responseText: "server error, most likely the URL was not defined " + url}
|
||||
}
|
||||
|
||||
function FormData() {}
|
||||
var $window = {
|
||||
FormData: FormData,
|
||||
XMLHttpRequest: function XMLHttpRequest() {
|
||||
var args = {}
|
||||
var headers = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue