feat(WADO) Allow WADO / QIDO requests to originate from client (#222)

This commit is contained in:
Erik Ziegler authored and GitHub committed 2018-07-17 13:03:36 +02:00
1 parent 92408d4c86
commit ebe0a40f3e
43 files changed
+519 -571

No files matched your search

@@ -0,0 +1,18 @@
/**
* Converts the properties to URL query parameters. Based on:
* http://stackoverflow.com/questions/111529/create-query-parameters-in-javascript
*
* @param data
* @returns {string}
*/
encodeQueryData = function(data) {
var ret = [];
for (var d in data) {
if (data[d]) {
ret.push(encodeURIComponent(d) + '=' + encodeURIComponent(data[d]));
}
}
return ret.join('&');
};
@@ -0,0 +1,2 @@
import './encodeQueryData.js';
import './parseFloatArray.js';
@@ -0,0 +1,14 @@
export const parseFloatArray = function(obj) {
var result = [];
if (!obj) {
return result;
}
var objs = obj.split("\\");
for (var i = 0; i < objs.length; i++) {
result.push(parseFloat(objs[i]));
}
return result;
};