@@ -1193,10 +1193,13 @@ export class SDK {
1193
1193
const client : AxiosInstance = this . securityClient ! ;
1194
1194
const headers = { ...reqHeaders , ...config ?. headers } ;
1195
1195
1196
- let body : unknown ;
1196
+ let body : any ;
1197
1197
if ( reqBody instanceof FormData ) body = reqBody ;
1198
1198
else body = { ...reqBody } ;
1199
1199
1200
+ if ( body == null || Object . keys ( body ) . length === 0 )
1201
+ throw new Error ( "request body is required" ) ;
1202
+
1200
1203
return client
1201
1204
. post ( url , body , {
1202
1205
headers : headers ,
@@ -1303,10 +1306,13 @@ export class SDK {
1303
1306
const client : AxiosInstance = this . securityClient ! ;
1304
1307
const headers = { ...reqHeaders , ...config ?. headers } ;
1305
1308
1306
- let body : unknown ;
1309
+ let body : any ;
1307
1310
if ( reqBody instanceof FormData ) body = reqBody ;
1308
1311
else body = { ...reqBody } ;
1309
1312
1313
+ if ( body == null || Object . keys ( body ) . length === 0 )
1314
+ throw new Error ( "request body is required" ) ;
1315
+
1310
1316
return client
1311
1317
. post ( url , body , {
1312
1318
headers : headers ,
@@ -1403,10 +1409,13 @@ export class SDK {
1403
1409
const client : AxiosInstance = this . securityClient ! ;
1404
1410
const headers = { ...reqHeaders , ...config ?. headers } ;
1405
1411
1406
- let body : unknown ;
1412
+ let body : any ;
1407
1413
if ( reqBody instanceof FormData ) body = reqBody ;
1408
1414
else body = { ...reqBody } ;
1409
1415
1416
+ if ( body == null || Object . keys ( body ) . length === 0 )
1417
+ throw new Error ( "request body is required" ) ;
1418
+
1410
1419
return client
1411
1420
. put ( url , body , {
1412
1421
headers : headers ,
@@ -1463,10 +1472,13 @@ export class SDK {
1463
1472
const client : AxiosInstance = this . securityClient ! ;
1464
1473
const headers = { ...reqHeaders , ...config ?. headers } ;
1465
1474
1466
- let body : unknown ;
1475
+ let body : any ;
1467
1476
if ( reqBody instanceof FormData ) body = reqBody ;
1468
1477
else body = { ...reqBody } ;
1469
1478
1479
+ if ( body == null || Object . keys ( body ) . length === 0 )
1480
+ throw new Error ( "request body is required" ) ;
1481
+
1470
1482
return client
1471
1483
. put ( url , body , {
1472
1484
headers : headers ,
0 commit comments