2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Fix: Don't add null values to query string. (#5108)

* feat: add  boolean flag to mimic pre 1.x behavior for paramsSerializer custom function

* chore: update ParamsSerializer Readme

* fix: dont slice hash off URL if not appending params

* Omit nulls from formData serialization

* fix: dont add nulls or undefined values to arrays either

* readme update

* fix test

* chore: documentation

* chore: do TS properly

Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
ChronosMasterOfAllTime
2022-10-15 08:01:59 -05:00
committed by GitHub
parent ef1c48a476
commit b0ebf9fcac
6 changed files with 37 additions and 15 deletions
Vendored
+1 -1
View File
@@ -248,7 +248,7 @@ export interface ParamEncoder {
}
export interface CustomParamsSerializer {
(params: object, options?: ParamsSerializerOptions): string;
(params: Record<string, any>, options?: ParamsSerializerOptions): string;
}
export interface ParamsSerializerOptions extends SerializerOptions {