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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user