Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : How to get HTTP request content in case of error code

www.cryer.info
Managed Newsgroup Archive

How to get HTTP request content in case of error code

Subject:How to get HTTP request content in case of error code
Posted by:"Aivar Annamaa" (aivarannam..@hotmail.com)
Date:Wed, 23 Apr 2008 14:45:28

Hi!

Sometimes i want to send to client a HTTP error code plus additional
text in case of errors. I'm using TidHTTP as a client component. But it
throws exception in case of "HTTP/1.1 400 Bad Request" for example.

I'm using TFileStream as IdHTTP.Post AnswerStream and in case of HTTP
error the file remains empty although server is sending also some content.

How can i get that content?

greetings,
Aivar

Replies:

www.cryer.info
Managed Newsgroup Archive