Skip to content

Commit b2c7225

Browse files
committed
(webview2-runtime) Updated API endpoint and body
1 parent a06cb80 commit b2c7225

File tree

1 file changed

+4
-39
lines changed

1 file changed

+4
-39
lines changed

automatic/webview2-runtime/update.ps1

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. $PSScriptRoot\..\..\scripts\all.ps1
44

5-
$releases = 'https://msedge.api.cdp.microsoft.com/api/v1.1/contents/Browser/namespaces/Default/names/msedgewebview-stable-win-x64/versions/latest?action=select'
5+
$releases = 'https://msedge.api.cdp.microsoft.com/api/v2/contents/Browser/namespaces/Default/names?action=batchupdates'
66

77
function global:au_SearchReplace {
88
@{
@@ -21,44 +21,9 @@ function global:au_AfterUpdate {
2121
}
2222

2323
function global:au_GetLatest {
24-
$body = @{
25-
targetingAttributes = @{
26-
AppAp = ""
27-
AppBrandCode = ""
28-
AppCohort = ""
29-
AppCohortHint = ""
30-
AppCohortName = ""
31-
AppLang = ""
32-
AppMajorVersion = ""
33-
AppRollout = 0.06
34-
AppTargetVersionPrefix = ""
35-
AppVersion = ""
36-
ExpETag = ""
37-
HW_AVX = $true
38-
HW_DiskType = 2
39-
HW_LogicalCpus = 12
40-
HW_PhysicalRamGB = 64
41-
HW_SSE = $true
42-
HW_SSE2 = $true
43-
HW_SSE3 = $true
44-
HW_SSE41 = $true
45-
HW_SSE42 = $true
46-
HW_SSSE3 = $true
47-
InstallSource = "taggedmi"
48-
IsInternalUser = $false
49-
IsMachine = $false
50-
OemProductManufacturer = "System manufacturer"
51-
OemProductName = "System Product Name"
52-
OsArch = "x64"
53-
OsPlatform = "win"
54-
OsVersion = "10.0.19041.1415"
55-
Priority = 10
56-
Updater = "MicrosoftEdgeUpdate"
57-
UpdaterVersion = "1.3.155.85"
58-
}
59-
}
60-
61-
$response = Invoke-RestMethod -Uri $releases -Method Post -Body $body -UseBasicParsing
24+
$jsonString = '[ { "Product":"msedgewebview-stable-win-x64", "targetingAttributes": { "AppAp":"", "AppBrandCode":"", "AppCohort":"", "AppCohortHint":"", "AppCohortName":"", "AppLang":"", "AppMajorVersion":"", "AppRollout":0.29, "AppTargetVersionPrefix":"", "AppVersion":"", "ExpETag":"", "HW_AVX":true, "HW_DiskType":2, "HW_LogicalCpus":2, "HW_PhysicalRamGB":4, "HW_SSE":true, "HW_SSE2":true, "HW_SSE3":true, "HW_SSE41":true, "HW_SSE42":true, "HW_SSSE3":true, "InstallSource":"taggedmi", "IsInternalUser":false, "IsMachine":true, "IsWIP":false, "OemProductManufacturer":"System Manufacturer", "OemProductName":"System Product Name", "OsArch":"x64", "OsPlatform":"win", "OsVersion":"10.0.17763.3887", "Priority":10, "Updater":"MicrosoftEdgeUpdate", "UpdaterVersion":"1.3.175.27","WIPBranch":""}}]'
25+
26+
$response = Invoke-RestMethod -Uri $releases -Method Post -Body $jsonString -UseBasicParsing -ContentType 'application/json' -UserAgent 'Microsoft Edge Update/1.3.175.27;winhttp'
6227

6328
$version = $response.ContentId.Version
6429
$url32 = 'https://go.microsoft.com/fwlink/p/?LinkId=2124703'

0 commit comments

Comments
 (0)