Skip to content

Commit 620323d

Browse files
tiagoskanetaTiago Kaneta
andauthored
fix: formdata in axios template (#277)
Co-authored-by: Tiago Kaneta <[email protected]>
1 parent 37efbb9 commit 620323d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

templates/base/http-clients/axios-http-client.eta

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export class HttpClient<SecurityDataType = unknown> {
103103
requestParams.headers.post = {};
104104
requestParams.headers.put = {};
105105

106-
const formData = this.createFormData(body as Record<string, unknown>);
106+
body = this.createFormData(body as Record<string, unknown>);
107107
}
108108

109109
return this.instance.request({

tests/spec/axios/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ export class HttpClient<SecurityDataType = unknown> {
15471547
requestParams.headers.post = {};
15481548
requestParams.headers.put = {};
15491549

1550-
const formData = this.createFormData(body as Record<string, unknown>);
1550+
body = this.createFormData(body as Record<string, unknown>);
15511551
}
15521552

15531553
return this.instance.request({

tests/spec/axiosSingleHttpClient/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,7 @@ export class HttpClient<SecurityDataType = unknown> {
15471547
requestParams.headers.post = {};
15481548
requestParams.headers.put = {};
15491549

1550-
const formData = this.createFormData(body as Record<string, unknown>);
1550+
body = this.createFormData(body as Record<string, unknown>);
15511551
}
15521552

15531553
return this.instance.request({

tests/spec/jsAxios/schema.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export class HttpClient {
3434
requestParams.headers.common = { Accept: "*/*" };
3535
requestParams.headers.post = {};
3636
requestParams.headers.put = {};
37-
const formData = this.createFormData(body);
37+
body = this.createFormData(body);
3838
}
3939
return this.instance.request({
4040
...requestParams,

0 commit comments

Comments
 (0)