2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

Add support third-party library to serialize url params

This commit is contained in:
David Fournier
2015-10-03 11:24:49 +02:00
parent 4f732e8caa
commit 14ede9e18e
7 changed files with 52 additions and 27 deletions
+6
View File
@@ -169,6 +169,12 @@ This is the available config options for making requests. Only the `url` is requ
ID: 12345
},
// `paramsSerializer` is an optional function in charge of serializing `params`
// (e.g. https://www.npmjs.com/package/qs, http://api.jquery.com/jquery.param/)
paramsSerializer: function(params) {
return Qs.stringify(params, {arrayFormat: 'brackets'})
},
// `data` is the data to be sent as the request body
// Only applicable for request methods 'PUT', 'POST', and 'PATCH'
// When no `transformRequest` is set, must be a string, an ArrayBuffer or a hash