Skip to content

Commit

Permalink
Update Invoke-WebRequest to use -UseBasicParsing
Browse files Browse the repository at this point in the history
StoreBroker is being used on some systems where the
Internet Explorer engine is not available, or Internet
Explorer's first-launch configuration is not complete.

In those scenarios, it's necessary to specify -UseBasicParsing
with Invoke-WebRequest to indicate that it should use the response
object for HTML content without Document Object Model (DOM) parsing.
  • Loading branch information
HowardWolosky committed Mar 11, 2017
1 parent 3e0873d commit dd51495
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion StoreBroker/StoreBroker.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
CompanyName = 'Microsoft Corporation'
Copyright = 'Copyright (C) Microsoft Corporation. All rights reserved.'

ModuleVersion = '1.4.5'
ModuleVersion = '1.4.6'
Description = 'Provides command-line access to the Windows Store Submission REST API.'

RootModule = 'StoreIngestionApi'
Expand Down
2 changes: 2 additions & 0 deletions StoreBroker/StoreIngestionApi.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,7 @@ function Invoke-SBRestMethod
$params.Add("Method", $Method)
$params.Add("Headers", $headers)
$params.Add("UseDefaultCredentials", $true)
$params.Add("UseBasicParsing", $true)

if ($Method -in ('post', 'put') -and (-not [String]::IsNullOrEmpty($Body)))
{
Expand Down Expand Up @@ -1600,6 +1601,7 @@ function Invoke-SBRestMethod
$params.Add("Method", $Method)
$params.Add("Headers", $Headers)
$params.Add("UseDefaultCredentials", $true)
$params.Add("UseBasicParsing", $true)

if ($Method -in ('post', 'put') -and (-not [String]::IsNullOrEmpty($Body)))
{
Expand Down

0 comments on commit dd51495

Please sign in to comment.