Blog
All Blog Posts | Next Post | Previous PostTMS FNC REST Client to help you with REST Requests in the Delphi IDE
Monday, February 20, 2023
We've shown you a preview of the component last week for the 28th birthday of Delphi. (You can view Holger's video at the bottom of this blogpost.)
TTMSFNCRESTClient
This component is created to help developers with the configuration and testing of REST requests.
You can now configure the different aspects of your request in Design-Time. This means that you need no code at all to create your REST Request.
It is possible to just set the URL or you can build the URL with the host, port, path and the query parameters.
Next to that, you have the ability to add different custom headers, post data and we've implemented a quick way to add simple authorization.
The other frustrating part when working with API's or other HTTP requests, is that you need to use another application to test them.
Or you have to run your application again and again until you retrieve the response that you want.
With the TTMSFNCRESTClient you have the ability to check the configured request with a right-click on the component and select 'Test Request'.
This will show you the response or an error code if something went wrong.
TTMSFNCRESTClientEditor
Customers that have the TMS FNC UI Pack , can install an additional package which adds an editor for the TTMSFNCRESTClient. This editor has a lot more features and should be the time-saving tool when building HTTP requests.
Configure Request
With the TTMSFNCRESTClient you could set the different aspects of your request in Design-Time.
But with the TTMSFNCRESTClientEditor you'll have a visual overview of all of the different settings.
And you can go back and change requests that you've executed previously with the 'History' tab.
Response
In the lower part of the editor, you have a couple of pages available to examine different details of the response.
Next to the normal response, you can also check the response headers.
And if you retrieve a JSON response we can create the code for a Delphi class in just one click.
For other extensions there is a browser implemented that can show you a preview of your HTML response, image or PDF-file.
BETA release
As this is a BETA release we love to hear what you think about the product and if you encounter any problems while trying it out.
This helps us into developing a robust and user-friendly tool, that will give you the best experience when working with REST requests.
The download for the BETA can be found for all ALL-ACCESS users on your My Products Page in the TMS FNC Cloud section.
Gjalt Vanhouwaert
This blog post has received 2 comments.
Pieter Scheldeman
All Blog Posts | Next Post | Previous Post
This looks really interesting. I''m thinking loud but wouldn''t it be nice to have an editor that allows us to convert JSON Structure into Delphi classes? Even better if it will generate Aurelius attributes automatically !
Will it also be possible to paste JSON text into this editor and transform it into Delphi classes without the need to connect a REST full API server?
Ps: from mermory, there are some glitches when having installed both VCL UI Pack and FNC UI Pack: no icons are displayed on the editor. Other small glitch, GET/PUT/Update dropdown component doesn''t have the same height then the edit box where URL is entered.
WIERZBICKI Stéphane