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>>();
I use this component and I have a question. How to use GET method with Json Body in delphi 7?
I don’t actually use the component. As HTTP GET requests usually do not have a body, this might be not implemented. You might submit a feature request on the libraries issue tracker (https://github.com/fabriciocolombo/delphi-rest-client-api/issues) to suggest such a feature