Java Authenticator getRequestingPrompt() 方法

2025 年 3 月 20 日 | 阅读 2 分钟

Authenticator 类的 getRequestingPrompt() 方法用于获取请求者提供的提示字符串。

语法

参数

不传递任何参数。

返回

提示字符串由请求者提供(HTTP 请求的领域)

Throw

不抛出异常。

示例 1

输出

Host using url.getHost ::www.TpointTech.com
Prompt:null
//source code of https://tpointtech.cn is printed

示例 2

输出

Prompt :null
//source code of https://tpointtech.cn is printed.