Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: AIgnoreReplies

www.cryer.info
Managed Newsgroup Archive

Re: AIgnoreReplies

Subject:Re: AIgnoreReplies
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Mon, 10 Apr 2006 21:20:41

"David Fealkoff" <fealkoff@iatinc.net> wrote in message
news:443b08ab@newsgroups.borland.com...

> How is AIgnoreReplies used in the HTTP Get command?

It specifies a list of error codes that TIdHTTP will not throw an exception
for if the server returns any of them.

For example, if the server supports conditional requests, such as via the
'Last-Modified' header, you could assign a value to the Request.LastModified
property and then specify 304 for the AIgnoreReplies parameter.  Normally,
304 is treated as an HTTP error, but it is not a fatal error.  When the
server reports 304, it is merely stating that the requested content has not
changed since the specified date.  So your code could check to see whether
the Response.ResponseCode property is set to 200 or 304 when Get() returns.
If 200, then new data has been downloaded.  If 304, then no data has been
downloaded and you can continue using whatever data you may have cached in a
previous request.

> How is the Array of SmallInt populated and returned to the HTTPclient?

The easiest way to specify an array of values to Get() is to hard-code a
comma-delimited of values, surrounded by square brackets, in the call to
Get() directly.  For example:

    IdHTTP1.Get('http://www.site.com', [302, 304]);


Gambit

Replies:

none

In response to:

www.cryer.info
Managed Newsgroup Archive