JSONBr-Horse
JSONBr Middleware for Horse
- Quiet · last change 6-10-2022
- ★ 1 on GitHub
README
JSONBr Middleware for Horse
HorseJsonBr is a middleware created by Isaque Pinheiro to work with JSON in APIs developed with the Horse framework.
We created a channel on Telegram for questions and support:
⚙️ Installation
Installation is done using the boss install command:
boss install github.com/isaquepinheiro/horse-jsonbrIf you choose to install manually, simply add the following folders to your project, in Project > Options > Resource Compiler > Directories and Conditionals > Include file search path
../JSONBr-Horse/src✔️ Compatibility
This middleware is compatible with projects developed in:
- [X] Delphi
⚡️ Quickstart Delphi
uses
Horse,
Horse.JsonBr;
type
TMyClass = class
private
FName: String;
public
property Name: String read FName write FName;
end;
begin
THorse.Use(HorseJsonBr);
THorse.Get('/ping',
procedure(Req: THorseRequest; Res: THorseResponse; Next: TProc)
var
LObj: TMyClass;
begin
LObj := TMyClass.Create;
LObj.Name := 'JSONBr Middleware for Horse';
Res.Send<TMyClass>(LObj);
end);
THorse.Listen(9000,
procedure(Horse: THorse)
begin
Writeln('Servidor Rodando...');
end);
end.⚠️ License
HorseJsonBr is free and open-source middleware licensed under the MIT License.

