Recent

Author Topic: HttpClient :  (Read 1316 times)

SuperCyprien

  • New member
  • *
  • Posts: 8
HttpClient :
« on: January 02, 2024, 03:59:11 pm »
Hello,

I try to use the jHttpClient component but it seems not to work properly.
I would like to download a web page on which I'm looking for a special string.
I'm trying to use HttpClient1ContentResult(Sender: TObject; content: rawbytestring) method where I think (I did not find any special documentation about this component) the var called content contains the HTML page that the server sent to me.
But, the content var does not contain anything.

Did someone ever use this component with success ?

Thaddy

  • Hero Member
  • *****
  • Posts: 19272
  • Glad to be alive.
Re: HttpClient :
« Reply #1 on: January 02, 2024, 04:54:57 pm »
I suppose you want that for Android?
Then you should check their protocol policies, which are very strict and for good reason.
This has nothing to do with FreePASCAL but is just lazy.
Just read what the Android release notes say and read the Android documentation.

Silly question.  Just use the correct protocols. The minimum is tls 1.2 but that will be phased out in the near future.

THINK in 2024 and a happy learning year... :'(

If it is not for Android, use THttpClient.
« Last Edit: January 02, 2024, 05:04:25 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

SuperCyprien

  • New member
  • *
  • Posts: 8
Re: HttpClient :
« Reply #2 on: January 02, 2024, 05:17:22 pm »
Of course it is for Android, that's why I posted on "android" section.

I found the problem. I forgot to put "http" on one of the strings I used for URL. The problem is solved :)

 

TinyPortal © 2005-2018