Home > indy error > indy error

Indy Error

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; http://www.indyproject.org/kb/wherecanifindsocketerror.htm it only takes a minute: Sign up Delphi: Indy - how to get the response body on error? up vote 4 down vote favorite 2 Delphi6 and XE3. I want to get the real response body of a request. But the server makes error 500. Then the Indy replace the response text with the description of the error. This homepage http://stackoverflow.com/questions/17023712/delphi-indy-how-to-get-the-response-body-on-error is designed for answer 500 in non abnormal operations too, and we need to determine what to do from response text. Could I get the response text from IdHTTP or from an Exception object when the status code is 500? Thanks for any info! delphi http httpresponse indy share|improve this question edited May 6 '15 at 1:30 Afriza N Arief 3,2222654 asked Jun 10 '13 at 12:19 durumdara 1,26732355 which Indy version? –mjn Jun 10 '13 at 12:54 for XE3. It's interesting that EIdHTTPProtocolException's FErrorMessage contains the response, but I couldn't access it... :-( –durumdara Jun 10 '13 at 13:02 @durumdara: Why could you not access it? EIdHTTPProtocolException.ErrorMessage is a public property. –Remy Lebeau Jun 10 '13 at 16:08 It's my mistake... I used E.Message instead of E.ErrorMessage but I everytime missed... :-( –durumdara Jun 11 '13 at 6:28 add a comment| 1 Answer 1 active oldest votes up vote 7 down vote accepted When TIdHTTP encounters a server error, it raises an EIdHTTPProtocolException exception, where its ErrorCode pro

here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/8577900/what-should-i-do-about-302-found-exceptions-when-downloading-with-indy the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions https://www.experts-exchange.com/questions/22020179/Indy-IdHTTP-Component-Error-when-Calling-Get-Method-for-Https-URL.html Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. indy error Join them; it only takes a minute: Sign up What should I do about “302 Found” exceptions when downloading with Indy? up vote 3 down vote favorite I am trying to download a file to a string: function FetchUrl(const url: string): string; var idhttp : TIdHTTP; begin idhttp := TIdHTTP.Create(nil); try Result := idhttp.Get(url); finally idhttp.Free; end; end; indy error What is wrong with this code? I get an exception: HTTP/1.1 302 Found delphi indy share|improve this question edited Dec 20 '11 at 16:27 Rob Kennedy 130k13191355 asked Dec 20 '11 at 15:35 opc0de 6,436758140 3 If I remember correctly, there's an option in TIdHTTP that allows you to set "AllowRedirects" or something like that, then it will automatically redirect, except of course, if there's some magic done using javascript... –ComputerSaysNo Dec 20 '11 at 16:10 2 The correct property name is HandleRedirects. –Remy Lebeau Dec 20 '11 at 17:32 I get this same exception while downloading from an https location, but only when there's a proxy in the middle. Shouldn't https traffic pass "transparently" thru a proxy? Why should I get redirected? I had kept HandleRedirects to FALSE on purpose... –Bozzy Jul 8 '15 at 15:50 add a comment| 2 Answers 2 active oldest votes up vote 7 down vote accepted Set the TIdHTTP.HandleRedirects property to True. It is False by default. function FetchUrl(const url: string): string; var i

for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Indy IdHTTP Component - Error when Calling Get Method for Https URL Want to Advertise Here? Solved Indy IdHTTP Component - Error when Calling Get Method for Https URL Posted on 2006-10-10 Delphi 2 Verified Solutions 16 Comments 20,190 Views Last Modified: 2012-06-21 I'm trying to automate the task of downloading a file from a https web site. I'm just starting out and using the Indy IdHTTP component to try to send a Get request to the URL. My problem is that I get the following error: "An existing connection was forcibly closed by the remote host" when the Get method is called. I've done a considerable amount of research on the web in the process of getting to this point and have taken into account the following factors: Setting the Linger Socket Option Assigning a IdSSLIOHandlerSocketBase to the IdHTTP.IOHandler Downloading the required SSL dll's and saving them into my application root directory The relevant parts of my code are below: It is the ReturnedPage:= https.Get(URL); line that generates the error. ................................ TMyIdSSLIOHandlerSocketBase = class(TIdSSLIOHandlerSocketBase) protected FLinger: Boolean; procedure DoAfterBind; override; procedure SetLinger(Value: Boolean); procedure SetLingerOpt; public property Linger: Boolean read FLinger write SetLinger; function Clone : TIdSSLIOHandlerSocketBase; override; procedure StartSSL; override; end; ........................ procedure TMainForm.Button1Click(Sender: TObject); var https: TIdHTTP; URL: string; ReturnedPage: string; SSLIOHandler: TMyIdSSLIOHandlerSocketBase; begin SSLIOHandler:= TMyIdSSLIOHandlerSocketBase.Create

 

Related content

indy error 11004

Indy Error p for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a relatedl Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange Questions socket error Want to Advertise Here Solved socket error Posted on - - Delphi Verified Solution Comments Views Last Modified - - When I put my URL string in to the

indy error connecting with ssl

Indy Error Connecting With Ssl p here for a quick overview relatedl of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up Delphi and Indy SSL connection not

indy error accepting connection with ssl

Indy Error Accepting Connection With Ssl p here for a quick overview of the site Help Center Detailed relatedl answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of million programmers just like you helping each other Join them it only takes a minute Sign up IdHttpServerexception Error accepting connection with