Perform POST request with Lazarus

How can I execute a POST request using Lazarus?

I found that you can use Indy for Lazarus, but installing Indy itself is a bit of a hassle, you need to recompile it. Is there another way?

+4
source share
3 answers

Of course, you can use another library like Synapse . There is an httpsend block with functions like HttpPostURL() , it also supports SSL / TLS. I used this library with both Delphi and FPC.

If you don’t need to use SSL / TLS, proxies or other more complicated things, then it’s not difficult to create your own HTTP client based on a socket and many HTTP manuals.

+1
source

Using Indy with Lazarus is very simple if you don't need components in the palette, but create them at runtime.

Just add <indy>/Lib/Core , <indy>/Lib/Protocols and <indy>/Lib/System to the search path.

0
source

There is currently a fphttpclient block shipped with FPC. Therefore, there is no need for external libraries / components to send POST, GET tags, etc.

0
source

Source: https://habr.com/ru/post/1382267/


All Articles