Skip to content

chore: define headers while declaring #1134

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

Merged
merged 2 commits into from
May 11, 2020
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
90 changes: 54 additions & 36 deletions clients/client-accessanalyzer/protocols/Aws_restJson1_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,9 @@ export const serializeAws_restJson1_1CreateAnalyzerCommand = async (
input: CreateAnalyzerCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/analyzer";
let body: any;
const bodyParams: any = {};
Expand Down Expand Up @@ -152,8 +153,9 @@ export const serializeAws_restJson1_1CreateArchiveRuleCommand = async (
input: CreateArchiveRuleCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/analyzer/{analyzerName}/archive-rule";
if (input.analyzerName !== undefined) {
const labelValue: string = input.analyzerName;
Expand Down Expand Up @@ -203,8 +205,9 @@ export const serializeAws_restJson1_1DeleteAnalyzerCommand = async (
input: DeleteAnalyzerCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/analyzer/{analyzerName}";
if (input.analyzerName !== undefined) {
const labelValue: string = input.analyzerName;
Expand Down Expand Up @@ -242,8 +245,9 @@ export const serializeAws_restJson1_1DeleteArchiveRuleCommand = async (
input: DeleteArchiveRuleCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/analyzer/{analyzerName}/archive-rule/{ruleName}";
if (input.analyzerName !== undefined) {
const labelValue: string = input.analyzerName;
Expand Down Expand Up @@ -293,8 +297,9 @@ export const serializeAws_restJson1_1GetAnalyzedResourceCommand = async (
input: GetAnalyzedResourceCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/analyzed-resource";
const query: any = {};
if (input.analyzerArn !== undefined) {
Expand All @@ -321,8 +326,9 @@ export const serializeAws_restJson1_1GetAnalyzerCommand = async (
input: GetAnalyzerCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/analyzer/{analyzerName}";
if (input.analyzerName !== undefined) {
const labelValue: string = input.analyzerName;
Expand Down Expand Up @@ -355,8 +361,9 @@ export const serializeAws_restJson1_1GetArchiveRuleCommand = async (
input: GetArchiveRuleCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/analyzer/{analyzerName}/archive-rule/{ruleName}";
if (input.analyzerName !== undefined) {
const labelValue: string = input.analyzerName;
Expand Down Expand Up @@ -401,8 +408,9 @@ export const serializeAws_restJson1_1GetFindingCommand = async (
input: GetFindingCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/finding/{id}";
if (input.id !== undefined) {
const labelValue: string = input.id;
Expand Down Expand Up @@ -438,8 +446,9 @@ export const serializeAws_restJson1_1ListAnalyzedResourcesCommand = async (
input: ListAnalyzedResourcesCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/analyzed-resource";
let body: any;
const bodyParams: any = {};
Expand Down Expand Up @@ -472,8 +481,9 @@ export const serializeAws_restJson1_1ListAnalyzersCommand = async (
input: ListAnalyzersCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/analyzer";
const query: any = {};
if (input.maxResults !== undefined) {
Expand Down Expand Up @@ -503,8 +513,9 @@ export const serializeAws_restJson1_1ListArchiveRulesCommand = async (
input: ListArchiveRulesCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/analyzer/{analyzerName}/archive-rule";
if (input.analyzerName !== undefined) {
const labelValue: string = input.analyzerName;
Expand Down Expand Up @@ -545,8 +556,9 @@ export const serializeAws_restJson1_1ListFindingsCommand = async (
input: ListFindingsCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/finding";
let body: any;
const bodyParams: any = {};
Expand Down Expand Up @@ -588,8 +600,9 @@ export const serializeAws_restJson1_1ListTagsForResourceCommand = async (
input: ListTagsForResourceCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/tags/{resourceArn}";
if (input.resourceArn !== undefined) {
const labelValue: string = input.resourceArn;
Expand Down Expand Up @@ -622,8 +635,9 @@ export const serializeAws_restJson1_1StartResourceScanCommand = async (
input: StartResourceScanCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/resource/scan";
let body: any;
const bodyParams: any = {};
Expand All @@ -650,8 +664,9 @@ export const serializeAws_restJson1_1TagResourceCommand = async (
input: TagResourceCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/tags/{resourceArn}";
if (input.resourceArn !== undefined) {
const labelValue: string = input.resourceArn;
Expand Down Expand Up @@ -689,8 +704,9 @@ export const serializeAws_restJson1_1UntagResourceCommand = async (
input: UntagResourceCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "";
const headers: any = {
"Content-Type": ""
};
let resolvedPath = "/tags/{resourceArn}";
if (input.resourceArn !== undefined) {
const labelValue: string = input.resourceArn;
Expand Down Expand Up @@ -728,8 +744,9 @@ export const serializeAws_restJson1_1UpdateArchiveRuleCommand = async (
input: UpdateArchiveRuleCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/analyzer/{analyzerName}/archive-rule/{ruleName}";
if (input.analyzerName !== undefined) {
const labelValue: string = input.analyzerName;
Expand Down Expand Up @@ -788,8 +805,9 @@ export const serializeAws_restJson1_1UpdateFindingsCommand = async (
input: UpdateFindingsCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> => {
const headers: any = {};
headers["Content-Type"] = "application/json";
const headers: any = {
"Content-Type": "application/json"
};
let resolvedPath = "/finding";
let body: any;
const bodyParams: any = {};
Expand Down
Loading