Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can't get rid of http connection  RSS feed

 
Kartikey Shetty
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am working on posting multiple request to a server using HTTPClient . First i create a HTTPConnection (http://www.innovation.ch/java/HTTPClient/api/HTTPClient/HTTPConnection.html) and then send a post request. For every post thats made the HTTPResponse is read and processed. After i process the Response, i try to stop the connection, but it doesn't seem to work. Although it stops when i don't play with the response. I am probably missing some cleanup here for reponse, but there doesn't seem to be a close method for HTTPResponse(http://www.innovation.ch/java/HTTPClient/api/HTTPClient/HTTPResponse.html). This is how the code looks ...



I am not sure why the old connection doesn't die. Can anyone help me with this? Thanks everyone.

Thanks,
Kartik
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

So what do you mean by "stop" here, exactly? What do you want to happen that is not happening?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!