• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can't get rid of http connection

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic