diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ng/http.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ng/http.js b/src/ng/http.js index aa0eca74..9b133476 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -758,10 +758,15 @@ function $HttpProvider() { var parts = []; forEachSorted(params, function(value, key) { if (value == null || value == undefined) return; - if (isObject(value)) { - value = toJson(value); - } - parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(value)); + if (!isArray(value)) value = [value]; + + forEach(value, function(v) { + if (isObject(v)) { + v = toJson(v); + } + parts.push(encodeURIComponent(key) + '=' + + encodeURIComponent(v)); + }); }); return url + ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&'); } |
