Re: Cancelling HTTP GET?

Giganews Newsgroups
Subject: Re: Cancelling HTTP GET?
Posted by:  Remy Lebeau (Indy Team) (
Date: Mon, 23 Oct 2006

"Dave S" <> wrote in message

> Using IdHTTP from Indy 10 with D7, is there a way to cancel
> a download after it has begun from calling .Get() ?

The only way is to throw an exception inside the OnWork event, or disconnect
the socket from another thread.

> I want to offer the user a Cancel button on a download progress
> dialog.

Then you should be doing the download in a worker thread, posting status
notifications to the dialog when needed, and then have the dialog disconnect
the socket when needed.



In response to

Cancelling HTTP GET? posted by Dave S on Mon, 23 Oct 2006