A Delphi REST client API open source library

Fabricio Colombo created a Delphi REST client API to consume REST services written in any programming language on Github. It supports two implementations, using Indy 10 and WinHTTP.The API was tested in Delphi 7, XE, XE2 and XE3.

The library uses JSON serialization to and from Delphi objects and supports Generics. This allows to perform complex REST commands with little code, for example a GET which retrieves a TPerson object list:


var
  vList : TList<TPerson>;
begin
  vList := RestClient.Resource('http://localhost:8080/java-rest-server/rest/persons')
                     .Accept(RestUtils.MediaType_Json)
                     .Get<TList<TPerson>>();

See also: Open source REST client libraries for Delphi

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s