From c7523db16a48fbab3bea684380144e065bcea20b Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Wed, 12 Jun 2024 06:52:33 -0700 Subject: [PATCH] chore(credential-provider-http): remove warning when response content-type is not application/json (#6192) --- .../src/fromHttp/requestHelpers.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/packages/credential-provider-http/src/fromHttp/requestHelpers.ts b/packages/credential-provider-http/src/fromHttp/requestHelpers.ts index 9fb0c0afb35d..5a9d032ad0ac 100644 --- a/packages/credential-provider-http/src/fromHttp/requestHelpers.ts +++ b/packages/credential-provider-http/src/fromHttp/requestHelpers.ts @@ -28,16 +28,6 @@ export function createGetRequest(url: URL): HttpRequest { * @internal */ export async function getCredentials(response: HttpResponse, logger?: Logger): Promise { - const contentType = response?.headers["content-type"] ?? response?.headers["Content-Type"] ?? ""; - - if (!contentType.includes("json")) { - const warn: (warning: string) => void = - logger?.constructor?.name === "NoOpLogger" || !logger ? console.warn : logger.warn; - warn( - "HTTP credential provider response header content-type was not application/json. Observed: " + contentType + "." - ); - } - const stream = sdkStreamMixin(response.body); const str = await stream.transformToString();