Bir Web API yöntemini çağırmak için PowerShell üzerinde Invoke-RestMethod çalıştırıyorum. Çalışıyor ama bir dakika sonra, bir zaman aşımı hatası alıyorum. PowerShell'in çağrılan yöntem tamamlanana kadar beklemesini gerçekten isterim. Bunu nasıl yaparım? Yardımlarınız için teşekkürler. JohnInvoke-RestMethod çalıştırırken zaman aşımı hatası
PS C:\Test\TestScripts> .\Run_Automation 5.5.4.382.1
VERBOSE: GET http://server/api/Automation/GetAutomation?testName=5.5.4.382.1 with 0-byte payload
Invoke-RestMethod : The operation has timed out.
At C:\TeamCity\TeamCityScripts\Run_Automation.ps1:20 char:5
+ Invoke-RestMethod -Uri http://corloclaf2/api/Automation/GetAutomation?testNa ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId :WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Teşekkür Shane,! Çok takdir edildi. – bearaman
Daha fazla "zaman aşımı" parametresi yok. Bunun yerine 'TimeoutSec' kullanın. –
Cevabımı güncellemeyi güncelledim – ShaneC