Re: Post response code 500

Giganews Newsgroups
Subject: Re: Post response code 500
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Thu, 1 Jun 2006

"Chris Schofield" <Chris@nospam-c-j-s.co.uk> wrote in message
news:DB288A68AEFAE240Chris@nospam-c-j-s.co.uk...

> How do I get the xml data if the http.post has thrown an exception?

The data is available in the ErrorMessage property of the Exception, ie:

    try
        IdHTTP1.Post(http://www.site.com/xxxxxxx/cgiprog', httpstream,
fsres);
        // ...
    except
        on e: EIdHTTPProtocolException do
        begin
            ShowMessage(IntToStr(e.ReplyErrorCode) + ' ' + e.Message);
            ShowMessage(e.ErrorMessage);
        end;
    end;

Gambit

Replies

In response to

Post response code 500 posted by Chris Schofield on Thu, 1 Jun 2006