語言

HttpCookie.Version 屬性

定義

回傳此 Cookie 所遵循的協定版本。 -或- 設定該 cookie 所遵循的 cookie 協定版本。

public int Version { [Android.Runtime.Register("getVersion", "()I", "")] get; [Android.Runtime.Register("setVersion", "(I)V", "")] set; }
[<get: Android.Runtime.Register("getVersion", "()I", "")>]
[<set: Android.Runtime.Register("setVersion", "(I)V", "")>]
member this.Version : int with get, set

屬性值

若 cookie 符合原始 Netscape 規範,則為 0;若 cookie 符合 RFC 2965/2109 標準,則為 1

屬性

例外狀況

若 v 既非 0 也非 1

備註

財產取得者文件:

回傳此 Cookie 所遵循的協定版本。 版本 1 符合 RFC 2965/2109,版本 0 則符合 Netscape 所擬定的原始 cookie 規範。 瀏覽器提供的 Cookie 使用並識別瀏覽器的 Cookie 版本。

Java 文件 java.net.HttpCookie.getVersion()

屬性設定文件:

設定該 cookie 所遵循的 cookie 協定版本。 版本 0 符合原始 Netscape Cookie 規範。 版本 1 符合 RFC 2965/2109 規範。

Java 文件 java.net.HttpCookie.setVersion(int)

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於