Java Authenticator getRequestingPrompt() Method

The getRequestingPrompt() method of Authenticator Class is used to get the prompt string given by the requester.

Syntax:

Parameter:

No parameter is passed.

Return:

The prompt string is given by the requestor (realm for http requests)

Throw:

Does not throw the exception.

Example 1

Test it Now

Output:

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

Example 2

Test it Now

Output:

Prompt :null
//source code of https://www.javatpoint.com is printed. 





Latest Courses