Skip to content

Commit

Permalink
Merge pull request #15 from gdbarron/add-UseBasicParsing
Browse files Browse the repository at this point in the history
add UseBasicParsing to Invoke-WebRequest
  • Loading branch information
gdbarron authored Jul 16, 2021
2 parents e7d0454 + da05b55 commit ead739c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 3.1.1
- Add -UseBasicParsing to `Invoke-WebRequest` to avoid IE profile error

## 3.1.0
- Add `-CountOnly` to `Find-TppCertificate` to return the number of certificates found based on the filters provided, [#12](https://github.com/gdbarron/VenafiPS/issues/12)
- Move from `Invoke-RestMethod` to `Invoke-WebRequest` in `Invoke-VenafiRestMethod` so we get response headers, to be used with `-CountOnly` above. `Invoke-VenafiRestMethod` has a new parameter, `-FullResponse`, to retrieve the complete response, not just content value.
Expand Down
9 changes: 5 additions & 4 deletions VenafiPS/Public/Invoke-VenafiRestMethod.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ function Invoke-VenafiRestMethod {
}

$params = @{
Method = $Method
Uri = $uri
Headers = $hdr
ContentType = 'application/json'
Method = $Method
Uri = $uri
Headers = $hdr
ContentType = 'application/json'
UseBasicParsing = $true
}

if ( $Body ) {
Expand Down
2 changes: 1 addition & 1 deletion VenafiPS/Public/Test-ModuleHash.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function Test-ModuleHash {
)

try {
Invoke-webrequest -Uri "https://github.com/gdbarron/VenafiPS/releases/download/v$ModuleVersion/hash.json" -OutFile ('{0}/hash.json' -f $env:TEMP)
Invoke-webrequest -Uri "https://github.com/gdbarron/VenafiPS/releases/download/v$ModuleVersion/hash.json" -OutFile ('{0}/hash.json' -f $env:TEMP) -UseBasicParsing
$json = (Get-Content -Path ('{0}/hash.json' -f $env:TEMP) -Raw) | ConvertFrom-Json
}
catch {
Expand Down

0 comments on commit ead739c

Please sign in to comment.