HTTPVersion

決定 HTTP 版本。 如未設定,HTTPVersion 將為「HTTP/1.1」

語法

HTTPObject.HTTPVersion

其中:

  • HTTPVersion 是字串,例如: HTTP/1.1
範例

該指令碼將傳送 HTTP/1.0 要求:

Function Main

Dim HTTPObj as Object

ip = "www.gfi.com"

port = 80

Set HTTPobj = HTTP.Connect (ip,port)

'設定要求類型

HTTPobj.GetURL("/")

HTTPobj.Authentication = 1

HTTPobj.HTTPVersion = "HTTP/1.0"

'使用我們自訂的標頭傳送 GET 要求

HTTPResponse = HTTPobj.SendRequest ()

echo HTTPobj.RawResponseHeaders

End Function