How to update data using a TWebClientConnection with POST

Hi + tx for support!

I can successfully read data via TWebClientConnection in a TWebClientdataset.
I am unsure how to push modifications back to the DB.

The TWebClientConnection has httpPOST as well as postData. Am I right, that I have to manually set the URI to post to the REST endpoint, set the command to POST and fill in the postDATA as expected by the endpoint?

So I am supposed to use the events of the TWebCDS to update/delete and execute the REST call via the TWebClientConnection for each modified record?

Would it easier to use a TWebHTTPRequest to push the back?

Am I missing something?

Thank you!

Bernd

As it will highly depend on your backend how updates need to be pushed back, you'll need to implement at application level to get the updated information and perform the needed REST requests for your backend to do these updates. With WebClientDataset.GetPendingUpdates you get this information about the needed updates to push back to the server.

I see. But what is the POST Command and the POST-data good for? I can´t find info in the docs.

I understand, that there is no automatic update from the CDS directly via TWebClientConnection.
I understand, that I have to gather info via WebClientDataset.GetPendingUpdates – but having this, can I use the TwebClientConnection or must I use some http related stuff?

You'll need TWebHTTPRequest to implement it according to the particular REST interface you have to your data on the server.