Open gewisser opened 5 years ago
/** * Encodes a Url parameter string. * * @param {Object} obj */ Url.params = function (obj) { var params = [], escape = encodeURIComponent; params.add = function (key, value) { if (isFunction(value)) { value = value(); } if (value === null) { value = ''; } this.push(escape(key) + '=' + escape(value)); }; serialize(params, obj); return params.join('&').replace(/%20/g, '+'); };
Vue.http.options.emulateJSON = true;
It is a little uncomfortable when value equals undefined. A line is sent to the backend:
param=1
param=1¶m2=undefined¶m3=undefined
I could work on this.
src\url\index.js:58
Vue.http.options.emulateJSON = true;
It is a little uncomfortable when value equals undefined. A line is sent to the backend:
What is Expected?
body =
param=1
What is actually happening?
body =
param=1¶m2=undefined¶m3=undefined