Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

when set params with array obect, i want test=1&test=2, but return test[]=1&test[]=2 #615

Open
zhongjyyy opened this issue May 31, 2017 · 3 comments

Comments

@zhongjyyy
Copy link

zhongjyyy commented May 31, 2017

$http.get(url, { params: { test :[1,2] } }
i want url?test=1&test=2
but return test[]=1&test[]=2

can you fix it ?
./src/url/index.js
`
function serialize(params, obj, scope) {
.......

    if (scope) {
        key = scope + '[' + (plain || hash ? key : '') + ']';
    }

....
}
`

@oppianmatt
Copy link

yes this would be good for other backends that don't use php style post variables for arrays

@flyinglove
Copy link

is this modification released?

@zhongjyyy
Copy link
Author

zhongjyyy commented May 29, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants