Skip to content

MARS-CuriosityDelphi REST Library

Lightweight, powerful and Delphi-like. Build RESTful servers and clients with modern Delphi.

MARS-Curiosity

What is MARS-Curiosity? ​

MARS-Curiosity is an open-source library for building REST applications — both servers and clients — with Embarcadero Delphi.

On the server, you declare plain Delphi classes (resources) and decorate their methods with attributes such as [Path], [GET], [Produces]. MARS uses RTTI to route incoming HTTP requests to the right method, inject the parameters it needs, and serialize the result back to the client.

pascal
[Path('helloworld')]
THelloWorldResource = class
  [GET, Produces(TMediaType.TEXT_PLAIN)]
  function SayHelloWorld: string;
end;

function THelloWorldResource.SayHelloWorld: string;
begin
  Result := 'Hello World!';
end;

On the client, drop a few components on a form (or create them in code) and call your endpoints with a classic RAD experience, with automatic JSON ↔ record/object mapping.

Where to next? ​

Documentation language

This documentation is written in English to match the rest of the MARS project (README, source comments) and its international community. Contributions and translations are welcome — open a Pull Request.

Released under the Apache License 2.0.