Jump to content

Search the Community

Showing results for tags 'tsslhttpcli'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 2 results

  1. 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;
  2. Hello, I am trying to get data from a page and am getting error "206", the only detail is a "Authorization: Bearer" header. I'm entering the header in event "BeforeHeaderSend" Headers.Add('Authorization:Bearer ' + mToken.Text); HttpCliSusp.Connection := 'Keep-Alive'; HttpCliSusp.ContentTypePost := 'application/json;charset=UTF-8'; HttpCliSusp.RequestVer := '1.0'; HttpCliSusp.RcvdStream := TMemoryStream.Create; HttpCliSusp.URL := 'https://www.url-to-get.com'; HttpCliSusp.Get; i get HttpCliSusp.StatusCode = 206 Using the Indy component "TIdHttp" I get the content normally without error! IdHttp.Request.CustomHeaders.Add('Authorization:Bearer ' + mToken.Text); xHtmlRetorno := IdHttp.Get('https://www.url-get.com'); xHtmlRetorno comes content without errors. Where am I going wrong using the ICS TSslHttpCli component? Thanks!!!
×