我必須從Pingdom接收API。地址是https://api.pingdom.com.NET https身份驗證(pingdom api)
如何在.NET中使用http獲取https時獲取?谷歌給我自認倒黴:(
問候
工作更新::
感謝您的幫助..嘗試使用PowerShell:
$NC = New-Object System.Net.NetworkCredential("USER", "PASS")
$CC = New-Object System.Net.CredentialCache
$CC.Add("api.pingdom.com", 443, "Basic", $NC)
$webclient = [System.Net.WebRequest]::Create("https://api.pingdom.com")
$webclient.Credentials = $CC
$webclient.PreAuthenticate = $true
$webclient.Method = "POST"
$webclient.GetResponse()
我得到的錯誤:異常調用「 GetResponse「與」0「參數:」遠程服務器返回錯誤:(401)未經授權。「
有什麼好建議嗎?
有一個使用API的.net應用程序,您可以在這裏下載Visual Studio項目:http://www.pingdom.com/services/api-applications/ – 2012-07-25 11:53:34