Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(clients): write body only if there are payload members #6242

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions clients/client-amp/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -440,12 +440,9 @@ export const se_GetDefaultScraperConfigurationCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/scraperconfiguration");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
5 changes: 1 addition & 4 deletions clients/client-api-gateway/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1124,12 +1124,9 @@ export const se_GetAccountCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/account");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,9 @@ export const se_StartDiscoveryCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/start-discovery");
let body: any;
body = "";
b.m("POST").h(headers).b(body);
return b.build();
};
Expand Down
5 changes: 1 addition & 4 deletions clients/client-artifact/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,9 @@ export const se_GetAccountSettingsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/v1/account-settings/get");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
25 changes: 5 additions & 20 deletions clients/client-auditmanager/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,12 +593,9 @@ export const se_DeregisterAccountCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/account/deregisterAccount");
let body: any;
body = "";
b.m("POST").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -656,12 +653,9 @@ export const se_GetAccountStatusCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/account/status");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -901,12 +895,9 @@ export const se_GetInsightsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/insights");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -935,12 +926,9 @@ export const se_GetOrganizationAdminAccountCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/account/organizationAdminAccount");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand All @@ -953,12 +941,9 @@ export const se_GetServicesInScopeCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/services");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
15 changes: 3 additions & 12 deletions clients/client-backup/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -835,12 +835,9 @@ export const se_DescribeGlobalSettingsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/global-settings");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -889,12 +886,9 @@ export const se_DescribeRegionSettingsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/account-settings");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -1216,12 +1210,9 @@ export const se_GetSupportedResourceTypesCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/supported-resource-types");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
10 changes: 2 additions & 8 deletions clients/client-bedrock/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,9 @@ export const se_DeleteModelInvocationLoggingConfigurationCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/logging/modelinvocations");
let body: any;
body = "";
b.m("DELETE").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -467,12 +464,9 @@ export const se_GetModelInvocationLoggingConfigurationCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/logging/modelinvocations");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
5 changes: 1 addition & 4 deletions clients/client-chatbot/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,9 @@ export const se_GetAccountPreferencesCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/get-account-preferences");
let body: any;
body = "";
b.m("POST").h(headers).b(body);
return b.build();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,12 +787,9 @@ export const se_GetMessagingSessionEndpointCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/endpoints/messaging-session");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
15 changes: 3 additions & 12 deletions clients/client-chime-sdk-voice/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1004,12 +1004,9 @@ export const se_GetGlobalSettingsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/settings");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -1054,12 +1051,9 @@ export const se_GetPhoneNumberSettingsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/settings/phone-number");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -1366,12 +1360,9 @@ export const se_ListAvailableVoiceConnectorRegionsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/voice-connector-regions");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
15 changes: 3 additions & 12 deletions clients/client-chime/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2678,12 +2678,9 @@ export const se_GetGlobalSettingsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/settings");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -2728,12 +2725,9 @@ export const se_GetMessagingSessionEndpointCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/endpoints/messaging-session");
let body: any;
body = "";
let { hostname: resolvedHostname } = await context.endpoint();
if (context.disableHostPrefix !== true) {
resolvedHostname = "messaging-" + resolvedHostname;
Expand Down Expand Up @@ -2786,12 +2780,9 @@ export const se_GetPhoneNumberSettingsCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/settings/phone-number");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -964,12 +964,9 @@ export const se_VerifySessionCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/session");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,9 @@ export const se_GetAccountConfigurationCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/accountConfiguration/get");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
5 changes: 1 addition & 4 deletions clients/client-detective/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,9 @@ export const se_DisableOrganizationAdminAccountCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/orgs/disableAdminAccount");
let body: any;
body = "";
b.m("POST").h(headers).b(body);
return b.build();
};
Expand Down
15 changes: 3 additions & 12 deletions clients/client-devops-guru/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,9 @@ export const se_DescribeAccountHealthCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/accounts/health");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -309,12 +306,9 @@ export const se_DescribeEventSourcesConfigCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/event-sources");
let body: any;
body = "";
b.m("POST").h(headers).b(body);
return b.build();
};
Expand Down Expand Up @@ -461,12 +455,9 @@ export const se_DescribeServiceIntegrationCommand = async (
context: __SerdeContext
): Promise<__HttpRequest> => {
const b = rb(input, context);
const headers: any = {
"content-type": "application/json",
};
const headers: any = {};
b.bp("/service-integrations");
let body: any;
body = "";
b.m("GET").h(headers).b(body);
return b.build();
};
Expand Down
Loading
Loading