Java HttpURLConnection disconnect() MethodThe disconnect() is the method of HttpURLConnection class. This method is used to disconnect the server. This method cannot be used to implement for reusing other HttpURLConnection request. SyntaxExample 1Test it NowOutput: status code from HTTP response message : 200 connection disconnected Example 2Test it NowOutput: Date = Tue, 27 Nov 2018 04:06:28 GMT Connection disconnected Server = Apache Connection disconnected Set-Cookie = JSESSIONID=615EA0EEF0B0C58FFE5D6FB233FCA458; Path=/; Secure; HttpOnly Connection disconnected Content-Type = text/html;charset=ISO-8859-1 Connection disconnected Cache-Control = max-age=2592000 Connection disconnected Expires = Thu, 27 Dec 2018 04:06:28 GMT Connection disconnected Vary = Accept-Encoding,User-Agent Connection disconnected Keep-Alive = timeout=5, max=4000 Connection disconnected Next TopicJava HttpURLConnection class |
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