How to make an HTTP request in a separate thread with timeout?

Posted by Vitaly on Stack Overflow See other posts from Stack Overflow or by Vitaly
Published on 2010-03-18T07:26:35Z Indexed on 2010/03/18 7:31 UTC
Read the original article Hit count: 325

Filed under:
|
|
|
|

Hi,

I haven't programmed in Delphi for a while and frankly didn't think I'll ever have to but... Here I am, desperately trying to find some information on the matter and it's so scarce nowadays, I can't find anything. So maybe you guys could help me out.

Currently my application uses Synapse library to make HTTP calls, but it doesn't allow for setting a timeout. Usually, that's not a big problem, but now I absolutely must to have a timeout to handle any connectivity issues nicely.

What I'm looking for, is a library (synchronous or not) that will allow making HTTP requests absolutely transparent for the user with no visible or hidden delays. I can't immediately kill a thread right now, and with possibility of many frequent requests to the server that is not responding, it's no good.

© Stack Overflow or respective owner

Related posts about delphi

Related posts about threading