File tree Expand file tree Collapse file tree 4 files changed +12
-0
lines changed
templates/base/http-clients
axiosSingleHttpClient/__snapshots__ Expand file tree Collapse file tree 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> {
7979 }
8080
8181 protected createFormData(input: Record<string , unknown >): FormData {
82+ if (input instanceof FormData) {
83+ return input;
84+ }
8285 return Object.keys(input || {}).reduce((formData, key) => {
8386 const property = input[key];
8487 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> {
19891989 }
19901990
19911991 protected createFormData(input: Record<string, unknown>): FormData {
1992+ if (input instanceof FormData) {
1993+ return input;
1994+ }
19921995 return Object.keys(input || {}).reduce((formData, key) => {
19931996 const property = input[key];
19941997 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> {
19891989 }
19901990
19911991 protected createFormData(input: Record<string, unknown>): FormData {
1992+ if (input instanceof FormData) {
1993+ return input;
1994+ }
19921995 return Object.keys(input || {}).reduce((formData, key) => {
19931996 const property = input[key];
19941997 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 {
5656 }
5757 }
5858 createFormData(input) {
59+ if (input instanceof FormData) {
60+ return input;
61+ }
5962 return Object.keys(input || {}).reduce((formData, key) => {
6063 const property = input[key];
6164 const propertyContent = property instanceof Array ? property : [property];
You can’t perform that action at this time.
0 commit comments