Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
gist - verbose didn't help, print all iwr parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
majkinetor authored May 5, 2018
1 parent cd8fd83 commit be72e65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion AU/Plugins/Gist.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ $params = @{
Body = $gist | ConvertTo-Json
UseBasicparsing = $true
}

$params | ConvertTo-Json -Depth 100 | Write-Host

if ($ApiKey) {
$params.Headers = @{
Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($ApiKey))
}
}

$res = iwr @params -Verbose
$res = iwr @params

#https://api.github.com/gists/a700c70b8847b29ebb1c918d47ee4eb1/211bac4dbb707c75445533361ad12b904c593491
$id = (($res.Content | ConvertFrom-Json).history[0].url -split '/')[-2,-1] -join '/'
Expand Down

0 comments on commit be72e65

Please sign in to comment.