Fix string list parameters

This commit is contained in:
jendib
2013-08-01 23:32:55 +02:00
parent 0f75faeccc
commit 19db8f2445
5 changed files with 10 additions and 9 deletions
+2 -1
View File
@@ -107,6 +107,7 @@ var App = angular.module('docs', ['ui.state', 'ui.bootstrap', 'ui.route', 'ui.ke
// Configuring $http
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
$httpProvider.defaults.headers.put['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
$httpProvider.defaults.transformRequest = [function(data) {
var param = function(obj) {
var query = '';
@@ -118,7 +119,7 @@ var App = angular.module('docs', ['ui.state', 'ui.bootstrap', 'ui.route', 'ui.ke
if(value instanceof Array) {
for(i=0; i<value.length; ++i) {
subValue = value[i];
fullSubName = name + '[]';
fullSubName = name;
innerObj = {};
innerObj[fullSubName] = subValue;
query += param(innerObj) + '&';