XE5 REST Debugger Supercharged

Some people asked for the source code to using the new XE5 REST Client Library to consume the Kimono web service. The crazy thing is there isn’t any. I decided to make a video about how easy it is to consume REST web services the the new REST Client Library and the REST Debugger. In the process I thought of a way to make it even easier by supercharging the Rest Debugger (source code below).

In this video I show you how to create a REST Web service with Kimono Labs (in beta, so it will change) and then bind that data to your XE5 app using the REST Debugger.

You can supercharge your REST Debugger too. The source code is installed with XE5

C:\Program Files (x86)\Embarcadero\RAD Studio\12.0\source\data\rest\restdebugger

You will want to copy it somewhere else before modifying it. Then add a button where ever you want, and on the click event for the button add the following code:

StreamToClipboard([RESTClient, RESTRequest, RESTResponse, RESTResponseDataSetAdapter, RESTClient.Authenticator]);

And then download uCopyComponents.pas and add it to your project and uses clause. It is pretty simple, but is designed specifically to work with non-visual components, although could be modified to work with visual components too.

If you want to include the TClientDataSet in the copy, then add it to the array (although make sure it is not active). Or you could modify it to add a TFDMemTable. Use it how you wish, I hope it works for you. If you discover any bugs make any changes let me know. If anyone is interested in contributing to it, let me know.

This entry was posted in REST, Source Code, Tools and tagged , . Bookmark the permalink.

6 Responses to XE5 REST Debugger Supercharged

  1. Pingback: CodeRage 8 replays – Embarcadero Technologies – YouTube « The Wiert Corner – irregular stream of stuff

  2. Allen says:

    I’m very new to the REST client and I’m trying to figure out how to consume the rest service API that AT&T has for submitting MMS messages. I cannot get past the Oauth authorization part. Is it possible to get help with that from someone at embarcadero?

  3. Jim McKeeth says:

    Allen: There is some great documentation in the DocWiki on using the Oauth to connect to different services. http://docwiki.embarcadero.com/RADStudio/XE5/en/REST_Client_Library

  4. Allen says:

    Thanks. I figured out the authentication.

    Can you point me to an example of how I can send a file as part of a RestRequest?

  5. Allen says:

    Jim, can you help me with this.

    I am creating a param of Content-Type: with a value of multipart/related; type”application/json”; start=”startpart”; boundary=”foo”. However, the client is creating an additional “Content-Type” param on its own which results in the server rejecting my request because of the duplication content-type headers.

    How can I keep the Delphi rest client from creating a content-type if I have created it manually?

  6. Pingback: Use Fiddler With Delphi XE7 Firemonkey To Become A REST API Debugging Powerhouse | Delphi XE5 XE6 XE7 Firemonkey, Delphi Android, Delphi IOS

Leave a Reply