Sarina DuPoint from Embarcadero has a blog post up with a SSL enabled REST client tutorial that connects to the Beats Music API. It uses the TRESTClient components from Delphi XE5 Firemonkey and loads the results into a FireDAC MemTable. The MemTable is then finally linked to a TListView for display. This is also a good demo because it shows a little bit better how LiveBindings work and using the RESTClient with LiveBindings. This demo should work on Android and IOS but you will need to add some special code to enable SSL on IOS. Find out how to enable SSL on all platforms here. One other thing about the demo is that it uses the RESTRequest.Execute function which is a synchronous function and I would recommend either using the RESTRequest.ExecuteAsync function which is an asynchronous function or placing the Execute call within an anonymous thread. Not only will this make your app more responsive but under IOS if the REST call is slow it could cause IOS to close your application.
Head over and check out the full tutorial on building a SSL enabled REST app.
1 Comment