Update Invoke-ZertoRestRequest.ps1
This commit is contained in:
@@ -61,11 +61,15 @@ function Invoke-ZertoRestRequest {
|
|||||||
Uri = $submittedURI
|
Uri = $submittedURI
|
||||||
Method = $method
|
Method = $method
|
||||||
Headers = $headers
|
Headers = $headers
|
||||||
Body = $body
|
|
||||||
TimeoutSec = 100
|
TimeoutSec = 100
|
||||||
ContentType = "application/json"
|
ContentType = "application/json"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Ensure GET requests do not include a body
|
||||||
|
if ($method -ne "GET") {
|
||||||
|
$params["Body"] = $body
|
||||||
|
}
|
||||||
|
|
||||||
# Handle authentication requests
|
# Handle authentication requests
|
||||||
if ($uri -match "auth/realms/.*/protocol/openid-connect/token" -and $method -eq "POST") {
|
if ($uri -match "auth/realms/.*/protocol/openid-connect/token" -and $method -eq "POST") {
|
||||||
$data = @{
|
$data = @{
|
||||||
|
|||||||
Reference in New Issue
Block a user