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

Commit

Permalink
set SecurityProtocol in gist plugin
Browse files Browse the repository at this point in the history
closes #142
  • Loading branch information
majkinetor committed May 3, 2018
1 parent 8345593 commit 623d20d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions AU/Plugins/Gist.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ ls $Path | % {
}

# request

#https://github.com/majkinetor/au/issues/142
[System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor [System.Net.SecurityProtocolType]::Tls -bor [System.Net.SecurityProtocolType]::Ssl3

$uri = 'https://api.github.com/gists'
$params = @{
ContentType = 'application/json'
Expand All @@ -53,6 +57,7 @@ if ($ApiKey) {
Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($ApiKey))
}
}

$res = iwr @params

#https://api.github.com/gists/a700c70b8847b29ebb1c918d47ee4eb1/211bac4dbb707c75445533361ad12b904c593491
Expand Down

0 comments on commit 623d20d

Please sign in to comment.