From 4fbdc1a497abe002f867a0b3e2adfd6b0f8d2dcc Mon Sep 17 00:00:00 2001 From: Gyorgy Nadaban Date: Thu, 24 May 2018 00:21:49 -0400 Subject: [PATCH] Fixed WebRequest init (#40641) --- lib/ansible/modules/windows/win_get_url.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/windows/win_get_url.ps1 b/lib/ansible/modules/windows/win_get_url.ps1 index fd88e8be29b..8cd1998adcd 100644 --- a/lib/ansible/modules/windows/win_get_url.ps1 +++ b/lib/ansible/modules/windows/win_get_url.ps1 @@ -62,9 +62,9 @@ Function CheckModified-File($url, $dest, $headers, $credentials, $timeout, $use_ if ($credentials) { if ($force_basic_auth) { - $extWebClient.Headers.Add("Authorization","Basic $credentials") + $webRequest.Headers.Add("Authorization", "Basic $credentials") } else { - $extWebClient.Credentials = $credentials + $webRequest.Credentials = $credentials } }