Java Authenticator getRequestingURL() Method

The getRequestingURL() method of Authenticator class returns the URL that resulted in this request for authentication.

Syntax:

Parameter:

No parameter is passed.

Return:

the requesting URL

Throw:

Does not throw the exception.

Example 1

Test it Now

Output:

Port info ::-1
URL :null
// source code of https://www.javatpoint.com is printed. 

Example 2

Test it Now

Output:

URL info :null
Protocol:https
//source code of https://www.javatpoint.com is printed. 





Latest Courses