Skip to content

Commit d9b68f6

Browse files
authored
Enhance web request with User-Agent and headers (#2059)
Added User-Agent and custom headers to the web request.
1 parent 10f6763 commit d9b68f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function IsMavenPackageVersionPublished($pkgId, $pkgVersion, $groupId)
6767
}
6868

6969
Write-Host "Checking published package at $uri"
70-
$response = Invoke-WebRequest -Method "GET" -uri $uri -SkipHttpErrorCheck
70+
$response = Invoke-WebRequest -Method "GET" -uri $uri -SkipHttpErrorCheck -UserAgent "azure-sdk-for-android" -Headers @{ "Content-signal" = "search=yes,ai-train=no" }
7171

7272
if ($response.BaseResponse.IsSuccessStatusCode)
7373
{
@@ -200,4 +200,4 @@ function Publish-android-GithubIODocs ($DocLocation, $PublicArtifactLocation)
200200
}
201201
}
202202
}
203-
}
203+
}

0 commit comments

Comments
 (0)