How can I perform a POST request with Lazarus?
I found that it is possible to do using Indy for Lazarus, but the installation of Indy itself is a bit of a hassle, having to recompile and all. Is there another way?
Of course you can use other library like Synapse. There is httpsend
unit with functions like HttpPostURL()
, it also supports SSL/TLS. I used this library with both Delphi and FPC.
If you do not need to use SSL/TLS, proxy or other more complicated things then it is not very complicated to create your own HTTP simple client based on socket and many HTTP tutorials.
Using Indy with Lazarus is very easy, if you do not need the components in the palette but create them at run time.
Just add <indy>/Lib/Core
, <indy>/Lib/Protocols
and <indy>/Lib/System
to the search path.
Nowdays there is the fphttpclient unit supplied with FPC. So no need external libs/components to send POST, GET etc methods.