Skip to content

Commit e7ade04

Browse files
committed
Update node version to 24.11.1
1 parent c102636 commit e7ade04

File tree

7 files changed

+61
-65
lines changed

7 files changed

+61
-65
lines changed

dist/bitbar-cloud-api-client.js

Lines changed: 32 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bitbar-cloud-api-client.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bitbar-cloud-api-client.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/bitbar-cloud-api-client.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 19 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ApiConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type ApiConfig = {
3939

4040

4141
/**
42-
* With credentials? `undefined` (default) - set XSRF header only for the same origin requests
42+
* With XSRFToken? `undefined` (default) - set XSRF header only for the same origin requests
4343
*
4444
*/
4545
withXSRFToken?: boolean | undefined;

src/api/APIEntity.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,9 @@ export class APIEntity<RESPONSE = any, QUERY_PARAMS extends QueryParams | void =
191191
* Set form data
192192
*/
193193
formData(data: DATA): this {
194-
this.data(data);
194+
this.headers({
195+
'Content-Type': 'multipart/form-data'
196+
}).data(data);
195197
return this;
196198
}
197199

@@ -209,14 +211,13 @@ export class APIEntity<RESPONSE = any, QUERY_PARAMS extends QueryParams | void =
209211
requestConfig.headers = {};
210212
}
211213

212-
if (!(requestConfig.method === 'POST' && requestConfig.data instanceof FormData) &&
213-
requestConfig.headers['Content-Type'] == null) {
214+
if (requestConfig.headers['Content-Type'] == null) {
214215
requestConfig.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
215216
}
216217

217218
// Convert data if needed
218219
if (requestConfig.method === 'POST' &&
219-
(<string>requestConfig.headers['Content-Type'])?.startsWith('application/x-www-form-urlencoded') &&
220+
(<string>requestConfig.headers['Content-Type']).startsWith('application/x-www-form-urlencoded') &&
220221
requestConfig.data != null) {
221222
requestConfig.data = this.paramsSerializer(requestConfig.data);
222223
}

0 commit comments

Comments
 (0)