Charmed Quark Systems, Ltd. - Support Forums and Community
CQC HTTP Events? - Printable Version

+- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums)
+-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3)
+--- Forum: CQC Support (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=9)
+--- Thread: CQC HTTP Events? (/showthread.php?tid=5341)

Pages: 1 2 3


RE: CQC HTTP Events? - simplextech - 01-09-2020

(01-09-2020, 06:05 PM)Dean Roddey Wrote: You can write CML handlers for URLs on the web server of course. URLs of a particular form are mapped to CML macros.

Any examples?  Reading CML language reference is ok but without an example it's difficult to try and start with creating a URL handler and a processor for the POST data.


RE: CQC HTTP Events? - Dean Roddey - 01-10-2020

In the help it's Advanced Topics -> Implementing CML Bin. It has examples in there.


RE: CQC HTTP Events? - simplextech - 01-10-2020

(01-10-2020, 01:16 PM)Dean Roddey Wrote: In the help it's Advanced Topics -> Implementing CML Bin. It has examples in there.

In both examples they are of GET requests.  Can a POST request be processed this way?


RE: CQC HTTP Events? - Dean Roddey - 01-11-2020

There shouldn't be an issue with that.


RE: CQC HTTP Events? - simplextech - 01-11-2020

(01-11-2020, 06:43 AM)Dean Roddey Wrote: There shouldn't be an issue with that.

Good to know it will accept a POST.  There's no sample though on accepting it or processing/parsing.  I know the answer will be read the CML reference however that's not really a good answer as a language reference doesn't help with understanding the structure and usage if there's no example.  I'll attempt a forum search but I'm not very hopeful of finding anything with the condition of the forum.


RE: CQC HTTP Events? - Dean Roddey - 01-11-2020

Actually, I should say that you can get the query parameters sent with either GET or POST. You don't get any incoming body content, so if the POST involved incoming body content, then no, it can't handle that currently. Parsing HTML body content is a pretty big topic and at the time CML-Bin was created there may not have even been sufficient CML functionality to do it for anything beyond very basic text.

If you just want to get the query parameters, that's covered by Query/Post Parameters here:

https://www.charmedquark.com/Web2/CQCDocs/CQCDocs.html?topic=/AdvancedTopics/CMLBin/&page=/Overview


RE: CQC HTTP Events? - simplextech - 01-11-2020

(01-11-2020, 07:06 AM)Dean Roddey Wrote: Actually, I should say that you can get the query parameters sent with either GET or POST. You don't get any incoming body content, so if the POST involved incoming body content, then no, it can't handle that currently. Parsing HTML body content is a pretty big topic and at the time CML-Bin was created there may not have even been sufficient CML functionality to do it for anything beyond very basic text.

If you just want to get the query parameters, that's covered by Query/Post Parameters here:

https://www.charmedquark.com/Web2/CQCDocs/CQCDocs.html?topic=/AdvancedTopics/CMLBin/&page=/Overview

I'll check the other link as well because I need the body contents. [EDIT] yeah that only discusses the query parameters. I need to process the body content.