5

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?

mjn
  • 36,362
  • 28
  • 176
  • 378
Shade
  • 9,936
  • 5
  • 60
  • 85

3 Answers3

2

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.

Michał Niklas
  • 53,067
  • 18
  • 70
  • 114
  • Thanks for the info. I ended up installing Indy, as it also has more functionality, but will try Synapse soon. – Shade Nov 27 '11 at 19:50
0

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.

mjn
  • 36,362
  • 28
  • 176
  • 378
0

Nowdays there is the fphttpclient unit supplied with FPC. So no need external libs/components to send POST, GET etc methods.

TSr
  • 331
  • 1
  • 12