Java Authenticator getRequestingHost() MethodThe getRequestingHost() method of Authenticator Class is used to get the hostname of the site or proxy requesting authentication, or null if not available. Syntax:Parameter:No parameter is passed. Return:The hostname of the connection requiring authentication, null if it's not available. Throw:Does not throw the exception. Example 1Test it NowOutput: Host using url.getHost ::www.javaTpoint.com hostname:null //The source code of https://www.javatpoint.com will be printed Example 2Test it NowOutput: Hostname:null Next TopicgetRequestingPort() Mehtod |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India