Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Okta.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -456,21 +456,21 @@ function _oktaMakeCall()
{
$postData = ConvertTo-Json $body -Depth 10
Write-Verbose($postData)
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers `
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -UseBasicParsing -Headers $headers `
-ContentType $contentType -Verbose:$oktaVerbose -Body $postData -ErrorVariable evar -SessionVariable Global:myWebSession
} else {
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers `
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -UseBasicParsing -Headers $headers `
-ContentType $contentType -Verbose:$oktaVerbose -ErrorVariable evar -SessionVariable Global:myWebSession
}
} else {
if ( ($method -eq "Post") -or ($method -eq "Put") )
{
$postData = ConvertTo-Json $body -Depth 10
Write-Verbose($postData)
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers `
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -UseBasicParsing -Headers $headers `
-ContentType $contentType -Verbose:$oktaVerbose -Body $postData -ErrorVariable evar -WebSession $Global:myWebSession
} else {
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -Headers $headers `
$request2 = Invoke-WebRequest -Uri $uri -Method $method -UserAgent $userAgent -UseBasicParsing -Headers $headers `
-ContentType $contentType -Verbose:$oktaVerbose -ErrorVariable evar -WebSession $Global:myWebSession
}
}
Expand Down