驗證

啟用或停用 HTTP 和 Proxy 驗證。 如果已設定 ProxyUser、ProxyPassword、HttpUser 和 HttpPassword,則驗證將隱式設定為 TRUE。

語法

HTTPObject.Authentication

其中:

  • Authentication 是布林型(讀/寫)
範例

該指令碼將執行 GET 要求,並列印傳回代碼:

Function Main

Dim HTTPObj as Object

ip = "www.gfi.com"

port = 80

Set HTTPobj = HTTP.Connect (ip,port)

'設定要求類型

HTTPobj.GetURL("/")

'經由自動驗證通過 Proxy

'驗證必須設為 1

HTTPobj.Authentication = 1

'傳送 GET 要求

HTTPResponse = HTTPobj.SendRequest ()

echo HTTPResponse

End Function