How it works...
The URL where we have to send the data is http://localhost:8080/saveperson. The HTTP request is automatically created and sent to the server by the TRESTRequest and TRESTClient components. TRESTClient defines the endpoint for all the requests, while TRESTRequest defines the details for each different request. In this case, the BaseURL property contains the server name with the port (http://localhost:8080), while the request only has the Resource property set in the second part of the URL to saveperson.
What we're doing is adding a set of POST parameters with their values. Do you remember? RESTRequest1.Method is rmPOST, so it will be created and sent as a POST request. The parameter names depend on what the server expects, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access