Jump to content

DarkDucke

Members
  • Content Count

    14
  • Joined

  • Last visited

Everything posted by DarkDucke

  1. DarkDucke

    ICS V9.1 announced

    Hello, ICS components don't work with FMX Linux? I put a tsslHttpServer in the form, tried to compile for linux and [DCC Fatal Error] F_Prin.pas(16): F2613 Unit 'Ics.Fmx.OverbyteIcsWndControl' not found. thanks!
  2. Hello, I need to create a task for each row of a TSgringGrid, this task will take content from a web page, and update the data in a cell. I tried as follows: procedure TForm1.BitBtn1Click(Sender: TObject); var I, nCount : Integer; begin I := 0; nCount := 0; for I := 1 to StringGrid.RowCount-1 do begin if StringGrid.Cells[0, I] <> 'done' then begin inc(Q); if Q > 5 then Break; Async( procedure begin Memo1.lines.add('I=' + I.ToString() + ' Q=' + Q.ToString()); GetWebContent(I); end ).Await( procedure begin Memo1.lines.add('Done I=' + I.ToString() + ' Q=' + Q.ToString()); end); end; end; end; But that doesn't work, the value of I is always the same, I can't get the position of the TStringGrid line. How can I do this? Create 5 out of 5 tasks until all Grid lines have been queried. This cannot freeze the user interface. Thanks!!
  3. It worked perfectly, thanks for the help!
  4. In fact, I forgot to report, this code is in a button, but stored in a timer that checks again every 5s
  5. I updated my version to "8.62", and when sending a POST to a url, an error occurs at this location: unit OverbyteIcsHttpProt; procedure THttpCli.GetHeaderLineNext; begin //... else if Field = 'expires' then begin { V8.61 } try FRespExpires := RFC1123_StrToDate(Data) ; //<===error except FRespExpires := 0 ; end ; //... end; I can ignore the exception and receive the data, but cookies are not obtained, and to the browser by other pages, I get the error "403". Does anyone know about this error or how to troubleshoot? Thanks!
  6. Thanks for the clarification, I will wait for the official release!
  7. Hello, could you give me the url to download the zip of version 8.63? I joined SVN a the version is still 8.62 http://svn.overbyte.be:8443/svn/ics/trunk/Source/OverbyteIcsHttpProt.pas Version: 8.62 Thanks!
  8. Hello guys, I am getting this error when doing a POST in a url. "404 Connection aborted on request" xUrlPost := 'https://urltopost.com/8/pay'; Buf := AnsiString('{"value":90}'); DataOut := TMemoryStream.Create; if Length(Buf) > 0 then { Check if some data to post } DataOut.Write(Buf[1], Length(Buf)); DataOut.Seek(0, soBeginning); HttpCli.RcvdHeader.NameValueSeparator := ':'; HttpCli.ContentTypePost := 'application/json'; HttpCli.SendStream := DataOut; HttpCli.RcvdStream := TMemoryStream.Create; HttpCli.URL := xUrlPost; HttpCli.PostASync; in event "RequestDone" StatusCode = 404 and ReasonPhrase = "Connection aborted on request" what does the message "Connection aborted on request"? How can I get more details to correct the error? I found this error message in unit "OverbyteIcsHttpProt" in procedure "THttpCli.Abort". but I don't use the "Abort" command at any time! procedure THttpCli.Abort; var bFlag : Boolean; Msg : TMessage; begin FLocationFlag := FALSE; { Do not follow relocations V7.10 } { The following two lines prevent OnRequestDone from trigger twice V7.10 } FRcvdCount := 0; { Clear the receive buffer V7.10 } FReceiveLen := 0; { Clear the receive buffer V7.10 } if FState = httpReady then begin FState := httpAborting; if FCtrlSocket.State <> wsClosed then FCtrlSocket.Abort; FStatusCode := 200; FReasonPhrase := 'OK'; FRequestDoneError := httperrNoError; FState := httpReady; TriggerStateChange; WMHttpRequestDone(Msg); { Synchronous operation ! } Exit; end; bFlag := (FState = httpDnsLookup); StateChange(httpAborting); if bFlag then begin try FCtrlSocket.CancelDnsLookup; except { Ignore any exception } end; end; FStatusCode := 404; FReasonPhrase := 'Connection aborted on request'; FRequestDoneError := httperrAborted; if bFlag then SocketSessionClosed(Self, 0) else FCtrlSocket.Close; StateChange(httpReady); { 13/02/99 } end; I know error 404 as "page not found" but in this case the post url is correct. I copied the url from a post made from the browser!
  9. I am making a simple request in a url, and I get this error, what can it be? TSslHttpCli 404 can't resolve hostname to IP address httpTeste.RcvdStream := TMemoryStream.Create; httpTeste.URL := 'https://url-to-get/xxxx'; httpTeste.Get; //404 can't resolve hostname to IP address Thanks!
  10. In this case it was a badly formed url. ex: ttps://www.url.com (error) Https://www.url.com (OK)
  11. 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!!!
  12. DarkDucke

    The HTTP 206 Partial Content

    Hello, I updated the component to the latest version "8.62". I am using it as follows: HttpCliSusp.Connection := 'Keep-Alive'; HttpCliSusp.ContentTypePost := 'application/json;charset=UTF-8'; HttpCliSusp.AuthBearerToken := mToken.Text; HttpCliSusp.RequestVer := '1.1'; HttpCliSusp.RcvdStream := TMemoryStream.Create; HttpCliSusp.URL := 'url-to-get'; HttpCliSusp.Get; And Now I get the error: Invalid argument to date encode. I'm not using the event "BeforeHeaderSend"
×