dj

The Daraja HTTP Framework is a free open source library for Object Pascal (Free Pascal 3.0.4, Delphi 2009+), based on the stand-alone HTTP server component in Internet Direct (Indy).

The 2.0 release uses const parameters in the Handle method of the IHandler interface and its implementing classes.

old:
- procedure Handle(Target: string; Context: TdjServerContext; Request:
- TdjRequest; Response: TdjResponse);

new:
+ procedure Handle(const Target: string; Context: TdjServerContext; Request:
+ TdjRequest; Response: TdjResponse);

Note: this is a breaking change for code which declares custom handler implementations. Such code must now use a const parameter.

“Using const allows the compiler to optimize code for structured – and string-type parameters. It also provides a safeguard against unintentionally passing a parameter by reference to another routine.”

More information

– GitHub: https://github.com/michaelJustin/daraja-framework
– API documentation: https://michaeljustin.github.io/daraja-framework/
– Resources: https://www.habarisoft.com/daraja_framework.html
– Wiki: https://github.com/michaelJustin/daraja-framework/wiki


Discover more from Habarisoft Blog

Subscribe to get the latest posts sent to your email.

Leave a Reply

Your email address will not be published. Required fields are marked *