Java Authenticator getRequestingScheme() 方法

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

Authenticator 类的 getRequestingScheme() 方法用于获取请求者的 scheme(例如,HTTP 防火墙的 HTTP scheme)。

语法

参数

不传递任何参数。

返回

请求者的 scheme。

Throw

不抛出异常。

示例 1

输出

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

示例 2

输出

Scheme :null
Protocol:https
// Source code of https://tpointtech.cn is printed.