Java Authenticator getRequestingURL() 方法

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

Authenticator 类的 getRequestingURL() 方法返回导致此认证请求的 URL。

语法

参数

不传递任何参数。

返回

请求的 URL

Throw

不抛出异常。

示例 1

输出

Port info ::-1
URL :null
// source code of https://tpointtech.cn is printed. 

示例 2

输出

URL info :null
Protocol:https
//source code of https://tpointtech.cn is printed.