4 ms·
We needed a app for branding. That login to a website. So it needed to do a POST request. I struggled with fp and google for 30 min, and dropped to the `RunComm
by oneweekwonder 9y ago
We needed a app for branding. That login to a website. So it needed to do a POST request. I struggled with fp and google for 30 min, and dropped to the `RunCommand('curl',['https://ifconfig.co' https://ifconfig.co'],s, opt)` clutch with curl.exe(with licence file) bundled into my innosetup file... magic?!
- badsectoracula 9y agoFYI Free Pascal (and by extension, Lazarus) comes with fcl-web which contains, among others, an HTTP client. See: http://wiki.lazarus.freepascal.org/fphttpclient http://wiki.lazarus.freepascal.org/fphttpclient
- oneweekwonder 9y agoThanks this is the kind of info I needed. Only had a day in laz land and time was running out for my product. So had to cut corners. #TODO
- conductor 9y agolibcurl (with examples) is bundled in the FreePascal distribution, as well as simpler alternatives like fphttp, fphttpclient, fphttpwebclient, etc.
- oneweekwonder 9y agoThanks will look into it. It is hard to get the boss to allow you to write a mvp in non mainstream language. So I had a quick swing at the libs and wondered about so/dll dependancies compiled against my exe; and just went for a bundled exe, yum and apt curl install script... under a day native win and ubuntu support?!:D I'm sure there is a TODO tag above my command for the junior that is going to hate me because he now needs to code in lazarus... ;)