vue-resource icon indicating copy to clipboard operation
vue-resource copied to clipboard

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

Open zhongjyyy opened this issue 8 years ago • 3 comments

$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 : '') + ']';
    }

.... } `

zhongjyyy avatar May 31 '17 09:05 zhongjyyy

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

oppianmatt avatar Oct 09 '17 19:10 oppianmatt

is this modification released?

flyinglove avatar May 29 '18 03:05 flyinglove

I don’t know. The web development is so far ago, now I develop with python.

在 2018年5月29日,下午12:00,flyinglove <[email protected]mailto:[email protected]> 写道:

is this modification released?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/pagekit/vue-resource/issues/615#issuecomment-392646249, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMd80yheuEvPTL7DoobGHSufKBxdqpK-ks5t3MfDgaJpZM4NrXp-.

zhongjyyy avatar May 29 '18 04:05 zhongjyyy