Java HttpCookie setCommentURL() 方法

2025年3月22日 | 阅读1分钟

HttpCookie 类的 setCommentURL(String purpose) 方法用于指定一个描述 cookie 用途的 comment URL。Comment URL 仅适用于 RFC 2965。

语法

参数

上述方法只需要一个参数:

  1. purpose - 表示一个字符串,进一步指定了直接对用户可见的 comment URL。

返回

不适用

示例 1

输出

The comment URL is given as : 123.45.33.21

示例 2

输出

The first comment URL is given as : 345.187.90.
The second comment URL is given as : 452.121.29.7
下一主题Java HttpCookie