2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

URL params serializer; (#4734)

* Refactored BuildURL helper to use URLSearchParams serializer;

* Updated typings;
Added TS test;
This commit is contained in:
Dmitriy Mozgovoy
2022-05-25 09:16:38 +03:00
committed by GitHub
parent 467025bdb7
commit 934f390cc3
7 changed files with 84 additions and 87 deletions
+4 -1
View File
@@ -20,7 +20,10 @@ const config: AxiosRequestConfig = {
],
headers: { 'X-FOO': 'bar' },
params: { id: 12345 },
paramsSerializer: (params: any) => 'id=12345',
paramsSerializer: {
indexes: true,
encode: (value) => value
},
data: { foo: 'bar' },
timeout: 10000,
withCredentials: true,