Post/Update Data

I've a mySQL-DB behind some PHP-Code on a Server.
In HTML/JS I can update that data with code similar to this

var form_data=JSON.stringify($(this).serializeObject());

$.ajax({
    type : "POST",
    contentType : 'application/json',
    data : form_data,
    success : function(result) {
        showProducts();
    },
    error: function(xhr, resp, text) {
        // show error to console
        console.log(xhr, resp, text);
    }
});


Also I can delete, create,... data with similar method.

Is there a TMS WEBCore way to achieve that ? I found a HTTP-Component that can GET Data - but what about POST, DELETE, ...

Thanks, Tom

Have you checked TWebRESTClient that has a HttpsPost() method?

Yes, I saw and tried that - but I could not manage to run that without Authentication, Key, Secret, CallbackURL, Token and so on. Is it possible without using that ?

Just call that address -  post, put, delete that JSON data via the appropiate commands and read that JSON later via GET...

Since in handcoded HTML/JS it works fine I hoped to use that in WEBCore in a more comfortable way...

This TWebRESTClient is indeed designed for OAuth based REST API calls.
We'll need to check if it can be optionally also used without the typical OAuth flow.

Hello Bruno,

thanks for your answer. I guess there might be a lot of users that have databases behind simple php-scripts with JSON-data  or just parameters to post. OAuth apps are very common, powerful and useful of course for security reason - but when I think of bug-reporting, feedback, guestbook, questionaire or enterprise internal solutions, often easier systems are sufficient...

Would be great to see that when workload allows that to attend...

Regards, Tom

Yes, noted and we'll look into it.

Hello Bruno,

I'm really impressed and fascinated about the work of your team on WebCore. With the TWebHTTPRequest - component and a few settings in Headers and PostData I now can easily post my data against PHP/mySQL !

Seems promising - great work !

Regards, Tom

Great feedback Thomas! Many thanks!

Let us know any further feedback, comments, suggestions for improvements, little annoyances as we want to polish everything to get the experience as good as possible.