Jump to content

Recommended Posts

Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...