Skip to content

Latest commit

 

History

History
20 lines (17 loc) · 502 Bytes

README.md

File metadata and controls

20 lines (17 loc) · 502 Bytes

Invoke-RestMethod-2.0

Rest client for powershell 2.0 and above

Example:

####GET

Invoke-RestMethod20 -Method GET -Uri "http://httpbin.org/ip"

####POST

$body = @{Data = "some post data"} | ConvertTo-Json20
Invoke-RestMethod20 -Method POST -Uri "http://httpbin.org/post" -Body $body

####PUT

$body = @{User = "username"; Password = "password"} | ConvertTo-Json20  
Invoke-RestMethod20 -Method PUT -Uri "http://httpbin.org/put" -Body $body -asJson