Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : Re: Conditional TidHttp.GET()

www.cryer.info
Managed Newsgroup Archive

Re: Conditional TidHttp.GET()

Subject:Re: Conditional TidHttp.GET()
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Mon, 5 Mar 2007 17:37:46

"Joe Aley" <joealey2003@yahoo.com> wrote in message
news:45ecbff3$1@newsgroups.borland.com...

> I am guessing that i will have to write a header somewhere
> with the "if-modified-since" date.
>
> How is that?

Set the TIdHTTP.Request.LastModified property before calling Get().

Note - if you are using Indy 9 or earlier, Get() will throw an
exception if it receives a 304 reply, though.  You will have to wrap
the call in a try..except block, and then check the
TIdHTTP.Response.ResponseCode property in the except section.

If you are using Ind 10, on the other hand, then you can pass 304 to
Get()'s AIgnoreReplies parameter, and the exception will not be
thrown.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive