File tree 4 files changed +12
-0
lines changed
templates/base/http-clients
axiosSingleHttpClient/__snapshots__
4 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ export class HttpClient<SecurityDataType = unknown> {
79
79
}
80
80
81
81
protected createFormData(input: Record<string , unknown >): FormData {
82
+ if (input instanceof FormData) {
83
+ return input;
84
+ }
82
85
return Object.keys(input || {}).reduce((formData, key) => {
83
86
const property = input[key];
84
87
const propertyContent: any[] = (property instanceof Array) ? property : [property]
Original file line number Diff line number Diff line change @@ -1989,6 +1989,9 @@ export class HttpClient<SecurityDataType = unknown> {
1989
1989
}
1990
1990
1991
1991
protected createFormData(input: Record<string, unknown>): FormData {
1992
+ if (input instanceof FormData) {
1993
+ return input;
1994
+ }
1992
1995
return Object.keys(input || {}).reduce((formData, key) => {
1993
1996
const property = input[key];
1994
1997
const propertyContent: any[] = property instanceof Array ? property : [property];
Original file line number Diff line number Diff line change @@ -1989,6 +1989,9 @@ export class HttpClient<SecurityDataType = unknown> {
1989
1989
}
1990
1990
1991
1991
protected createFormData(input: Record<string, unknown>): FormData {
1992
+ if (input instanceof FormData) {
1993
+ return input;
1994
+ }
1992
1995
return Object.keys(input || {}).reduce((formData, key) => {
1993
1996
const property = input[key];
1994
1997
const propertyContent: any[] = property instanceof Array ? property : [property];
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ export class HttpClient {
56
56
}
57
57
}
58
58
createFormData(input) {
59
+ if (input instanceof FormData) {
60
+ return input;
61
+ }
59
62
return Object.keys(input || {}).reduce((formData, key) => {
60
63
const property = input[key];
61
64
const propertyContent = property instanceof Array ? property : [property];
You can’t perform that action at this time.
0 commit comments