Skip to content

Commit

Permalink
Merge pull request #109 from TomasVrbkaBlogic/master
Browse files Browse the repository at this point in the history
fix authorization header in form data request
  • Loading branch information
gaboe authored Aug 9, 2024
2 parents 5d54457 + 1a6aa67 commit 432b74a
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 62 deletions.
4 changes: 2 additions & 2 deletions apps/cli/src/lib/renderers/InfrastructureTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,11 @@ export const getInfrastructureTemplate = (isCookiesAuthEnabled: boolean) => {
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_all_of_reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_anonymous_object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_auth_login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_bracket_params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_common_prefix_v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_common_prefix_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_nswag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_nswag_cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_one_of.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_one_of_cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_petstore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_petstore_cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/cli/src/tests/__snapshots__/generate_post_put_bodies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@
request: TRequest,
headers: Headers
) {
updateHeaders(headers);
if (request instanceof FormData) {
headers.delete("Content-Type");
return request;
} else {
updateHeaders(headers);
} else {
return JSON.stringify(request);
}
}
Expand Down
Loading

0 comments on commit 432b74a

Please sign in to comment.