Estefanie
Members-
Content Count
6 -
Joined
-
Last visited
Everything posted by Estefanie
-
How to use TSslHttpRest?
-
Hello guys, I am getting this error when doing a GET in a url. "404 Connection aborted on request" SslHttpCli := TSslHttpCli.Create(nil); sendStream := TMemoryStream.Create; rcvStream := TMemoryStream.Create; SslHttpCli.SslContext := SslContext1.Create(nil); SslHttpCli.ServerAuth := httpAuthNone; SslHttpCli.Connection := 'keep-alive'; SSlHttpCli.ProxyConnection := 'Keep-Alive'; SslHttpCli.MultiThreaded := true; SslHttpCli.URL := 'https://www.poemist.com/api/v1/randompoems'; SslHttpCli.SendStream := sendStream; SslHttpCli.NoCache := False; SslHttpCli.ContentTypePost := 'application/json'; SslHttpCli.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; try SslHttpCli.Get; stringStream := TStringStream.Create('', TEncoding.UTF8); stringStream.LoadFromStream(SslHttpCli.RcvdStream); data := stringStream.DataString; mResult.Lines.Add(data); stringStream.Free;
-
TSslHttpCli 404 Connection aborted on request
Estefanie replied to Estefanie's topic in Delphi IDE and APIs
i don't find the documentation, -
TSslHttpCli 404 Connection aborted on request
Estefanie replied to Estefanie's topic in Delphi IDE and APIs
how to use OverbyteIcsHttpRestTst , it's a similar TSslHttpCli? -
TSslHttpCli 404 Connection aborted on request
Estefanie replied to Estefanie's topic in Delphi IDE and APIs
Can you use OverbyteIcsHttpRestTst in delphi XE2? -
tsslhttpcli TSslHttpCli Access violation at address or 404 error
Estefanie posted a topic in ICS - Internet Component Suite
Hello I am getting this error when doing a GET in a url. "404 Connection aborted on request" or this mistake access violation in delphi xe2 This is my code in the button var data: String; HttpClient: TSslHttpCli; xmlDoc: TXMLDocument; dataStream: TMemoryStream; begin mResult.Lines.Clear; xmlDoc := TXMLDocument.Create(Self); HttpClient := TSslHttpCli.Create(nil); HttpClient.ContentTypePost := 'text/xml'; HttpClient.URL:= 'https://www.poemist.com/api/v1/randompoems'; HttpClient.RcvdStream := TStringStream.Create(''); try try ShowMessage(IntToStr(HttpClient.StatusCode)); //HttpClient.GetASync; HttpClient.Get; ShowMessage('-3-1-'); { SslHttpCli.SendStream := dataStream; SslHttpCli.SendStream.Write(Data[1], Length(Data)) ; SslHttpCli.SendStream.Seek(0,0); mResult.Lines.LoadFromStream(dataStream); } // xmlDoc.LoadFromStream(HttpClient.RcvdStream); // xmlDoc.Active := True; dataStream.LoadFromStream(SslHttpCli.RcvdStream); mResult.Lines.LoadFromStream(dataStream); // mResult.Lines.LoadFromStream(HttpClient.RcvdStream); Except raise; end; finally HttpClient.Free; xmlDoc.Free; end;