Skip to content

Instantly share code, notes, and snippets.

@joeapearson
Created November 1, 2018 16:50
Show Gist options
  • Select an option

  • Save joeapearson/8a98a50d122d1a83943ecb5d3c2795f5 to your computer and use it in GitHub Desktop.

Select an option

Save joeapearson/8a98a50d122d1a83943ecb5d3c2795f5 to your computer and use it in GitHub Desktop.
Make an HTTPS call from PowerShell
# Have to do this first otherwise you get connection dropped errors
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-RestMethod -Uri "https://example.com" -Method Post -ContentType 'multipart/form-data' -Body @{ key1 = 'value'; key2 = 'value' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment