This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpURLConnection timeout  RSS feed

 
Sachin Gurjar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to set a timeout when opening a connection to an HttpURLConnection.

I need an implementation of class that allows me to set the timeout even before response is generated. We want to override the default timeout.

We are using jdk1.3 so we can't use the solution provided by Java 1.4. I am aware about HttpClient by apache, but due to some architectural issues we don't want to use it.

Please do let me know if anyone has implemented similar solution or can suggest some solution.

Regards,
Sachin
 
Ryan McGuire
Ranch Hand
Posts: 1142
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See this thread.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!