-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrequest-behavior.html
32 lines (32 loc) · 1.42 KB
/
request-behavior.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<script>
window.requestBehavior =
{
/**
*
* @param {type} requestUrl
* @param {type} successListener
* @param {type} failureListener
* @param {type} methodType
* @param {type} params
* @param {type} additionalValue
* @param {type} isFileUpload
* @param {type} headers
* @returns {window.requestBehavior._getIronRequestObj.request}
*/
_getIronRequestObj: function (requestUrl, successListener, failureListener, methodType, params, additionalValue, isFileUpload, headers) {
if (!requestUrl) {
throw new Error("request url can not be empty!");
}
var request = {};
request["url"] = requestUrl;
request["successListener"] = successListener;
request["failureListener"] = failureListener;
request["methodType"] = methodType;
request["params"] = params;
request["additionalValue"] = additionalValue;
request["isFileUpload"] = isFileUpload;
request["headers"] = headers;
return request;
}
};
</script>