Skip to content

Commit e40b474

Browse files
authored
chore(clients): write body only if there are payload members (#6242)
1 parent 4447542 commit e40b474

File tree

61 files changed

+159
-602
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+159
-602
lines changed

clients/client-amp/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -440,12 +440,9 @@ export const se_GetDefaultScraperConfigurationCommand = async (
440440
context: __SerdeContext
441441
): Promise<__HttpRequest> => {
442442
const b = rb(input, context);
443-
const headers: any = {
444-
"content-type": "application/json",
445-
};
443+
const headers: any = {};
446444
b.bp("/scraperconfiguration");
447445
let body: any;
448-
body = "";
449446
b.m("GET").h(headers).b(body);
450447
return b.build();
451448
};

clients/client-api-gateway/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1124,12 +1124,9 @@ export const se_GetAccountCommand = async (
11241124
context: __SerdeContext
11251125
): Promise<__HttpRequest> => {
11261126
const b = rb(input, context);
1127-
const headers: any = {
1128-
"content-type": "application/json",
1129-
};
1127+
const headers: any = {};
11301128
b.bp("/account");
11311129
let body: any;
1132-
body = "";
11331130
b.m("GET").h(headers).b(body);
11341131
return b.build();
11351132
};

clients/client-application-signals/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -367,12 +367,9 @@ export const se_StartDiscoveryCommand = async (
367367
context: __SerdeContext
368368
): Promise<__HttpRequest> => {
369369
const b = rb(input, context);
370-
const headers: any = {
371-
"content-type": "application/json",
372-
};
370+
const headers: any = {};
373371
b.bp("/start-discovery");
374372
let body: any;
375-
body = "";
376373
b.m("POST").h(headers).b(body);
377374
return b.build();
378375
};

clients/client-artifact/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,9 @@ export const se_GetAccountSettingsCommand = async (
5050
context: __SerdeContext
5151
): Promise<__HttpRequest> => {
5252
const b = rb(input, context);
53-
const headers: any = {
54-
"content-type": "application/json",
55-
};
53+
const headers: any = {};
5654
b.bp("/v1/account-settings/get");
5755
let body: any;
58-
body = "";
5956
b.m("GET").h(headers).b(body);
6057
return b.build();
6158
};

clients/client-auditmanager/src/protocols/Aws_restJson1.ts

+5-20
Original file line numberDiff line numberDiff line change
@@ -593,12 +593,9 @@ export const se_DeregisterAccountCommand = async (
593593
context: __SerdeContext
594594
): Promise<__HttpRequest> => {
595595
const b = rb(input, context);
596-
const headers: any = {
597-
"content-type": "application/json",
598-
};
596+
const headers: any = {};
599597
b.bp("/account/deregisterAccount");
600598
let body: any;
601-
body = "";
602599
b.m("POST").h(headers).b(body);
603600
return b.build();
604601
};
@@ -656,12 +653,9 @@ export const se_GetAccountStatusCommand = async (
656653
context: __SerdeContext
657654
): Promise<__HttpRequest> => {
658655
const b = rb(input, context);
659-
const headers: any = {
660-
"content-type": "application/json",
661-
};
656+
const headers: any = {};
662657
b.bp("/account/status");
663658
let body: any;
664-
body = "";
665659
b.m("GET").h(headers).b(body);
666660
return b.build();
667661
};
@@ -901,12 +895,9 @@ export const se_GetInsightsCommand = async (
901895
context: __SerdeContext
902896
): Promise<__HttpRequest> => {
903897
const b = rb(input, context);
904-
const headers: any = {
905-
"content-type": "application/json",
906-
};
898+
const headers: any = {};
907899
b.bp("/insights");
908900
let body: any;
909-
body = "";
910901
b.m("GET").h(headers).b(body);
911902
return b.build();
912903
};
@@ -935,12 +926,9 @@ export const se_GetOrganizationAdminAccountCommand = async (
935926
context: __SerdeContext
936927
): Promise<__HttpRequest> => {
937928
const b = rb(input, context);
938-
const headers: any = {
939-
"content-type": "application/json",
940-
};
929+
const headers: any = {};
941930
b.bp("/account/organizationAdminAccount");
942931
let body: any;
943-
body = "";
944932
b.m("GET").h(headers).b(body);
945933
return b.build();
946934
};
@@ -953,12 +941,9 @@ export const se_GetServicesInScopeCommand = async (
953941
context: __SerdeContext
954942
): Promise<__HttpRequest> => {
955943
const b = rb(input, context);
956-
const headers: any = {
957-
"content-type": "application/json",
958-
};
944+
const headers: any = {};
959945
b.bp("/services");
960946
let body: any;
961-
body = "";
962947
b.m("GET").h(headers).b(body);
963948
return b.build();
964949
};

clients/client-backup/src/protocols/Aws_restJson1.ts

+3-12
Original file line numberDiff line numberDiff line change
@@ -835,12 +835,9 @@ export const se_DescribeGlobalSettingsCommand = async (
835835
context: __SerdeContext
836836
): Promise<__HttpRequest> => {
837837
const b = rb(input, context);
838-
const headers: any = {
839-
"content-type": "application/json",
840-
};
838+
const headers: any = {};
841839
b.bp("/global-settings");
842840
let body: any;
843-
body = "";
844841
b.m("GET").h(headers).b(body);
845842
return b.build();
846843
};
@@ -889,12 +886,9 @@ export const se_DescribeRegionSettingsCommand = async (
889886
context: __SerdeContext
890887
): Promise<__HttpRequest> => {
891888
const b = rb(input, context);
892-
const headers: any = {
893-
"content-type": "application/json",
894-
};
889+
const headers: any = {};
895890
b.bp("/account-settings");
896891
let body: any;
897-
body = "";
898892
b.m("GET").h(headers).b(body);
899893
return b.build();
900894
};
@@ -1216,12 +1210,9 @@ export const se_GetSupportedResourceTypesCommand = async (
12161210
context: __SerdeContext
12171211
): Promise<__HttpRequest> => {
12181212
const b = rb(input, context);
1219-
const headers: any = {
1220-
"content-type": "application/json",
1221-
};
1213+
const headers: any = {};
12221214
b.bp("/supported-resource-types");
12231215
let body: any;
1224-
body = "";
12251216
b.m("GET").h(headers).b(body);
12261217
return b.build();
12271218
};

clients/client-bedrock/src/protocols/Aws_restJson1.ts

+2-8
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,9 @@ export const se_DeleteModelInvocationLoggingConfigurationCommand = async (
350350
context: __SerdeContext
351351
): Promise<__HttpRequest> => {
352352
const b = rb(input, context);
353-
const headers: any = {
354-
"content-type": "application/json",
355-
};
353+
const headers: any = {};
356354
b.bp("/logging/modelinvocations");
357355
let body: any;
358-
body = "";
359356
b.m("DELETE").h(headers).b(body);
360357
return b.build();
361358
};
@@ -467,12 +464,9 @@ export const se_GetModelInvocationLoggingConfigurationCommand = async (
467464
context: __SerdeContext
468465
): Promise<__HttpRequest> => {
469466
const b = rb(input, context);
470-
const headers: any = {
471-
"content-type": "application/json",
472-
};
467+
const headers: any = {};
473468
b.bp("/logging/modelinvocations");
474469
let body: any;
475-
body = "";
476470
b.m("GET").h(headers).b(body);
477471
return b.build();
478472
};

clients/client-chatbot/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -505,12 +505,9 @@ export const se_GetAccountPreferencesCommand = async (
505505
context: __SerdeContext
506506
): Promise<__HttpRequest> => {
507507
const b = rb(input, context);
508-
const headers: any = {
509-
"content-type": "application/json",
510-
};
508+
const headers: any = {};
511509
b.bp("/get-account-preferences");
512510
let body: any;
513-
body = "";
514511
b.m("POST").h(headers).b(body);
515512
return b.build();
516513
};

clients/client-chime-sdk-messaging/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -787,12 +787,9 @@ export const se_GetMessagingSessionEndpointCommand = async (
787787
context: __SerdeContext
788788
): Promise<__HttpRequest> => {
789789
const b = rb(input, context);
790-
const headers: any = {
791-
"content-type": "application/json",
792-
};
790+
const headers: any = {};
793791
b.bp("/endpoints/messaging-session");
794792
let body: any;
795-
body = "";
796793
b.m("GET").h(headers).b(body);
797794
return b.build();
798795
};

clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts

+3-12
Original file line numberDiff line numberDiff line change
@@ -1004,12 +1004,9 @@ export const se_GetGlobalSettingsCommand = async (
10041004
context: __SerdeContext
10051005
): Promise<__HttpRequest> => {
10061006
const b = rb(input, context);
1007-
const headers: any = {
1008-
"content-type": "application/json",
1009-
};
1007+
const headers: any = {};
10101008
b.bp("/settings");
10111009
let body: any;
1012-
body = "";
10131010
b.m("GET").h(headers).b(body);
10141011
return b.build();
10151012
};
@@ -1054,12 +1051,9 @@ export const se_GetPhoneNumberSettingsCommand = async (
10541051
context: __SerdeContext
10551052
): Promise<__HttpRequest> => {
10561053
const b = rb(input, context);
1057-
const headers: any = {
1058-
"content-type": "application/json",
1059-
};
1054+
const headers: any = {};
10601055
b.bp("/settings/phone-number");
10611056
let body: any;
1062-
body = "";
10631057
b.m("GET").h(headers).b(body);
10641058
return b.build();
10651059
};
@@ -1366,12 +1360,9 @@ export const se_ListAvailableVoiceConnectorRegionsCommand = async (
13661360
context: __SerdeContext
13671361
): Promise<__HttpRequest> => {
13681362
const b = rb(input, context);
1369-
const headers: any = {
1370-
"content-type": "application/json",
1371-
};
1363+
const headers: any = {};
13721364
b.bp("/voice-connector-regions");
13731365
let body: any;
1374-
body = "";
13751366
b.m("GET").h(headers).b(body);
13761367
return b.build();
13771368
};

clients/client-chime/src/protocols/Aws_restJson1.ts

+3-12
Original file line numberDiff line numberDiff line change
@@ -2678,12 +2678,9 @@ export const se_GetGlobalSettingsCommand = async (
26782678
context: __SerdeContext
26792679
): Promise<__HttpRequest> => {
26802680
const b = rb(input, context);
2681-
const headers: any = {
2682-
"content-type": "application/json",
2683-
};
2681+
const headers: any = {};
26842682
b.bp("/settings");
26852683
let body: any;
2686-
body = "";
26872684
b.m("GET").h(headers).b(body);
26882685
return b.build();
26892686
};
@@ -2728,12 +2725,9 @@ export const se_GetMessagingSessionEndpointCommand = async (
27282725
context: __SerdeContext
27292726
): Promise<__HttpRequest> => {
27302727
const b = rb(input, context);
2731-
const headers: any = {
2732-
"content-type": "application/json",
2733-
};
2728+
const headers: any = {};
27342729
b.bp("/endpoints/messaging-session");
27352730
let body: any;
2736-
body = "";
27372731
let { hostname: resolvedHostname } = await context.endpoint();
27382732
if (context.disableHostPrefix !== true) {
27392733
resolvedHostname = "messaging-" + resolvedHostname;
@@ -2786,12 +2780,9 @@ export const se_GetPhoneNumberSettingsCommand = async (
27862780
context: __SerdeContext
27872781
): Promise<__HttpRequest> => {
27882782
const b = rb(input, context);
2789-
const headers: any = {
2790-
"content-type": "application/json",
2791-
};
2783+
const headers: any = {};
27922784
b.bp("/settings/phone-number");
27932785
let body: any;
2794-
body = "";
27952786
b.m("GET").h(headers).b(body);
27962787
return b.build();
27972788
};

clients/client-codecatalyst/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -964,12 +964,9 @@ export const se_VerifySessionCommand = async (
964964
context: __SerdeContext
965965
): Promise<__HttpRequest> => {
966966
const b = rb(input, context);
967-
const headers: any = {
968-
"content-type": "application/json",
969-
};
967+
const headers: any = {};
970968
b.bp("/session");
971969
let body: any;
972-
body = "";
973970
b.m("GET").h(headers).b(body);
974971
return b.build();
975972
};

clients/client-codeguru-security/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,9 @@ export const se_GetAccountConfigurationCommand = async (
154154
context: __SerdeContext
155155
): Promise<__HttpRequest> => {
156156
const b = rb(input, context);
157-
const headers: any = {
158-
"content-type": "application/json",
159-
};
157+
const headers: any = {};
160158
b.bp("/accountConfiguration/get");
161159
let body: any;
162-
body = "";
163160
b.m("GET").h(headers).b(body);
164161
return b.build();
165162
};

clients/client-detective/src/protocols/Aws_restJson1.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -309,12 +309,9 @@ export const se_DisableOrganizationAdminAccountCommand = async (
309309
context: __SerdeContext
310310
): Promise<__HttpRequest> => {
311311
const b = rb(input, context);
312-
const headers: any = {
313-
"content-type": "application/json",
314-
};
312+
const headers: any = {};
315313
b.bp("/orgs/disableAdminAccount");
316314
let body: any;
317-
body = "";
318315
b.m("POST").h(headers).b(body);
319316
return b.build();
320317
};

clients/client-devops-guru/src/protocols/Aws_restJson1.ts

+3-12
Original file line numberDiff line numberDiff line change
@@ -249,12 +249,9 @@ export const se_DescribeAccountHealthCommand = async (
249249
context: __SerdeContext
250250
): Promise<__HttpRequest> => {
251251
const b = rb(input, context);
252-
const headers: any = {
253-
"content-type": "application/json",
254-
};
252+
const headers: any = {};
255253
b.bp("/accounts/health");
256254
let body: any;
257-
body = "";
258255
b.m("GET").h(headers).b(body);
259256
return b.build();
260257
};
@@ -309,12 +306,9 @@ export const se_DescribeEventSourcesConfigCommand = async (
309306
context: __SerdeContext
310307
): Promise<__HttpRequest> => {
311308
const b = rb(input, context);
312-
const headers: any = {
313-
"content-type": "application/json",
314-
};
309+
const headers: any = {};
315310
b.bp("/event-sources");
316311
let body: any;
317-
body = "";
318312
b.m("POST").h(headers).b(body);
319313
return b.build();
320314
};
@@ -461,12 +455,9 @@ export const se_DescribeServiceIntegrationCommand = async (
461455
context: __SerdeContext
462456
): Promise<__HttpRequest> => {
463457
const b = rb(input, context);
464-
const headers: any = {
465-
"content-type": "application/json",
466-
};
458+
const headers: any = {};
467459
b.bp("/service-integrations");
468460
let body: any;
469-
body = "";
470461
b.m("GET").h(headers).b(body);
471462
return b.build();
472463
};

0 commit comments

Comments
 (0)