Forum > Networking and Web Programming

Can't use fphttpclient to GET HTML

(1/5) > >>

anon101:
Hey guys,
I'm trying to use Trello's API to get some stuff ('https://api.trello.com/1/members/me/boards?key={yourKey}&token={yourToken}'). However, I keep getting this error:
"Exception class 'EInOutError' with message:
Could not initialize OpenSSL library".

By the way, I'm trying to use this code (where URL is just a string):

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Result := TFPCustomHTTPClient.SimpleGet(url);
I've googled this, but haven't found anything. It does work for getting, for example, a google page, however not for their API.

Thanks for any help/feedback from you guys!

Mocte:
Hi anon101

Seems like the openssl libraries are missing, see :

http://wiki.lazarus.freepascal.org/fphttpclient

anon101:
Aren't they built into Lazarus.
Because I want to be able to compile this afterwards and have it just work everywhere on every operating system. That's why I'm using Lazarus. It says there that it
--- Quote ---will ship with version 2.8.0 and above
--- End quote ---

Thanks a load

CCRDude:
Even if the external libraries are "shipped" (haven't verified that), that doesn't mean they're built into it. You still have to make them available on every computer the application runs. Like put them into the same folder as the executable. That makes sense anyway since OpenSSL libraries are updated often and you should use the newest (of the compatible branch).

rvk:
I had a procedure to download openssl from http://indy.fulgan.com/SSL/ automatically when not available.
There was no need for https so you could download openssl with Lazarus itself (with TFPCustomHTTPClient.SimpleGet()).

To my horror I now see fulgan switched to a redirect to https. So downloading openssl isn't possible anymore without a third-party program  :'( :'( :'(

I guess that'll need to be changed by calling URLDownloadToFile() (on Windows) to download openssl from https.

Navigation

[0] Message Index

[#] Next page

Go to full version