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>();
Discover more from Habarisoft Blog
Subscribe to get the latest posts sent to your email.