Java Authenticator getRequestingScheme() Method

The getRequestingScheme() method of Authenticator class is used to get the scheme of the requester (the HTTP scheme for an HTTP firewall, for example).

Syntax:

Parameter:

No parameter is passed.

Return:

The scheme of the requester.

Throw:

Does not throw the exception.

Example 1

Test it Now

Output:

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

Example 2

Test it Now

Output:

Scheme :null
Protocol:https
// Source code of https://www.javatpoint.com is printed. 





Latest Courses