Commit 12d239ac authored by Thimo Kraemer's avatar Thimo Kraemer

Coding convention

parent 342c2afe
......@@ -851,19 +851,19 @@ kss.POST = function(url, data, timeout, headers, callback) {
};
kss.SEND = function(method, url, data, timeout, headers, callback) {
var async = !!callback, content_type;
var async = !!callback, contentType;
var xhr = new XMLHttpRequest();
xhr.open(method, url, async);
if(headers) {
kss.each(headers, function(value, key) {
if (key.toLowerCase() == 'content-type') {
content_type = value;
contentType = value;
}
xhr.setRequestHeader(key, value);
});
}
if(data instanceof Object) {
if (content_type == 'application/json') {
if (contentType == 'application/json') {
data = kss.toJSON(data);
}
else if (data instanceof Array) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment