Cragdoo Posted April 5, 2019 Share Posted April 5, 2019 Has anyone successfully made RESt calls using powershell Invoke-RestMethod or Invoke-WebRequest? Can't see, to get the header syntax Have tried $header = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("$($username):$($password)"))} Invoke-RestMethod -uri https://api.pulseway.com/v2/systems -Method POST -Header $header -ContentType "application/json" but keep getting '400 Bad request' any pointers? Link to comment Share on other sites More sharing options...
ErlendG Posted April 9, 2019 Share Posted April 9, 2019 GET, don’t POST Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now