Skip to content

Commit

Permalink
fix: request default endpoints from serde context being overwritten (#…
Browse files Browse the repository at this point in the history
…1097)

* fix: request default endpoints from serde context being overwritten

* test(client-s3): add client test
  • Loading branch information
AllanZhengYP authored Apr 17, 2020
1 parent 00bfbe8 commit 299d2a1
Show file tree
Hide file tree
Showing 224 changed files with 5,172 additions and 5,130 deletions.
72 changes: 36 additions & 36 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ export async function serializeAws_restJson1_1CreateAnalyzerCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "PUT",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -186,12 +186,12 @@ export async function serializeAws_restJson1_1CreateArchiveRuleCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "PUT",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -222,13 +222,13 @@ export async function serializeAws_restJson1_1DeleteAnalyzerCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "DELETE",
headers: headers,
path: resolvedPath,
query: query,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -271,13 +271,13 @@ export async function serializeAws_restJson1_1DeleteArchiveRuleCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "DELETE",
headers: headers,
path: resolvedPath,
query: query,
body: body
body: body,
...context.endpoint
});
}

Expand All @@ -297,13 +297,13 @@ export async function serializeAws_restJson1_1GetAnalyzedResourceCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "GET",
headers: headers,
path: resolvedPath,
query: query,
body: body
body: body,
...context.endpoint
});
}

Expand All @@ -330,12 +330,12 @@ export async function serializeAws_restJson1_1GetAnalyzerCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "GET",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -374,12 +374,12 @@ export async function serializeAws_restJson1_1GetArchiveRuleCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "GET",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -408,13 +408,13 @@ export async function serializeAws_restJson1_1GetFindingCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "GET",
headers: headers,
path: resolvedPath,
query: query,
body: body
body: body,
...context.endpoint
});
}

Expand All @@ -441,12 +441,12 @@ export async function serializeAws_restJson1_1ListAnalyzedResourcesCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "POST",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand All @@ -469,13 +469,13 @@ export async function serializeAws_restJson1_1ListAnalyzersCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "GET",
headers: headers,
path: resolvedPath,
query: query,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -509,13 +509,13 @@ export async function serializeAws_restJson1_1ListArchiveRulesCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "GET",
headers: headers,
path: resolvedPath,
query: query,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -551,12 +551,12 @@ export async function serializeAws_restJson1_1ListFindingsCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "POST",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand All @@ -583,12 +583,12 @@ export async function serializeAws_restJson1_1ListTagsForResourceCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "GET",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand All @@ -609,12 +609,12 @@ export async function serializeAws_restJson1_1StartResourceScanCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "POST",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -646,12 +646,12 @@ export async function serializeAws_restJson1_1TagResourceCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "POST",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -682,13 +682,13 @@ export async function serializeAws_restJson1_1UntagResourceCommand(
}
let body: any;
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "DELETE",
headers: headers,
path: resolvedPath,
query: query,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -741,12 +741,12 @@ export async function serializeAws_restJson1_1UpdateArchiveRuleCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "PUT",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down Expand Up @@ -782,12 +782,12 @@ export async function serializeAws_restJson1_1UpdateFindingsCommand(
}
body = JSON.stringify(bodyParams);
return new __HttpRequest({
...context.endpoint,
protocol: "https",
method: "PUT",
headers: headers,
path: resolvedPath,
body: body
body: body,
...context.endpoint
});
}

Expand Down
4 changes: 2 additions & 2 deletions clients/client-acm-pca/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4113,11 +4113,11 @@ const buildHttpRpcRequest = (
body: any
): __HttpRequest => {
const contents: any = {
...context.endpoint,
protocol: "https",
method: "POST",
path: path,
headers: headers
headers: headers,
...context.endpoint
};
if (resolvedHostname !== undefined) {
contents.hostname = resolvedHostname;
Expand Down
4 changes: 2 additions & 2 deletions clients/client-acm/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2790,11 +2790,11 @@ const buildHttpRpcRequest = (
body: any
): __HttpRequest => {
const contents: any = {
...context.endpoint,
protocol: "https",
method: "POST",
path: path,
headers: headers
headers: headers,
...context.endpoint
};
if (resolvedHostname !== undefined) {
contents.hostname = resolvedHostname;
Expand Down
4 changes: 2 additions & 2 deletions clients/client-alexa-for-business/protocols/Aws_json1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14195,11 +14195,11 @@ const buildHttpRpcRequest = (
body: any
): __HttpRequest => {
const contents: any = {
...context.endpoint,
protocol: "https",
method: "POST",
path: path,
headers: headers
headers: headers,
...context.endpoint
};
if (resolvedHostname !== undefined) {
contents.hostname = resolvedHostname;
Expand Down
Loading

0 comments on commit 299d2a1

Please sign in to comment.