HttpURLConnection: Is it necessary to call connect()?

Posted by stormin986 on Stack Overflow See other posts from Stack Overflow or by stormin986
Published on 2010-05-08T02:26:06Z Indexed on 2010/05/08 2:28 UTC
Read the original article Hit count: 376

Many examples I've seen don't explicitly call connect(). Instead they just use getInputStream() or getResponseCode().

I'm assuming all of these HttpURLConnection methods that require a connection just call connect() themselves?

Are there any cases where connect() must be explicitly called for an HttpURLConnection?

© Stack Overflow or respective owner

Related posts about java

Related posts about httpurlconnection