Open source REST client libraries for Delphi

delphi-oop

delphi-oop includes a REST client to consume RESTful web services using your own annotated class (similar to JAX-RS). It supports Google OAuth 2.0 authentication. The library is mostly tested with Delphi XE and hosted on Google Code at https://code.google.com/p/delphi-oop/

Code example: (more examples on the project page)

TODataNorthwindClient = class(TSvRESTClient)
  public
    [GET] [Path('/Customers')] [Consumes(MEDIA_TYPE.JSON)]
    function GetCustomers(): TCustomers; virtual;
  end;

delphi-rest-client-api

This library by Fabricio Colombo to consume RESTful web services supports two implementations, using Indy 10 and WinHTTP. The API was tested in Delphi XE, XE2 and XE3 and is hosted on Github at https://github.com/fabriciocolombo/delphi-rest-client-api

Code example:

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

Originally posted on Roberto Schneiders:

Many thanks to all those who participated in the discussion in the previous post. All comments, criticisms and compliments are welcome. This is what motivates me to keep writing this blog.

The repercussion of the previous post was much bigger than I expected. The Embarcadero team corrected some of the DataSnap problems and therefore I decided to redo these tests and create this new post.

View original 2,784 more words

Preliminary Open MQ 5.0 released

A preliminary release of the open source message broker OpenMQ 5.0 has been released. Open MQ 5 will support JMS 2.0 and is planned to be included with GlassFish Server, Open Source Edition 4.0. A commercial client library for Delphi and Free Pascal is available from Habarisoft.