Skip to content

πŸ“‘ NetHTTP

Samuel edited this page Sep 18, 2024 · 15 revisions

βš™οΈ Setup

NetHTTP is the default http component library. No need to setup.

πŸ›‘ Limitations

For product versions lower than 26 (Delphi 10.3), unfortunately, I could not find a solution to cancel long polling connections with NetHTTP so that I could maintain retro-compatibility for Delphi 10.3 and lower. NetHTTP class was simply incomplete from product version 26 and lower and that was a shock to me. If you are using a product version lower or equal than 26 (10.3) you'll not be able to unsubscribe from topics unless you close and restart the application or service. The issue of canceling an on going request was only addressed in product version 27, where TNetHTTPRequest received these methods. This PR has more information on that.

βœ… Recomended version

It's recommended using Delphi 12 or higher because Embarcadero has finally added a better support for long poll requests because of AI focused REST APIs. The subscription mechanism does not properly work in lower versions and you have to continuously check if connection is active by doing short poll (Poll=True, check the library).

πŸ‘£ Compatibility

Operational System Support
Windows βœ”
Linux βœ”
MacOS βœ”
Android βœ”
IOS βœ”
Clone this wiki locally