Charmed Quark Systems, Ltd. - Support Forums and Community

Full Version: CQC HTTP Events?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(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.
In the help it's Advanced Topics -> Implementing CML Bin. It has examples in there.
(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?
There shouldn't be an issue with that.
(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.
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/CQCDoc...=/Overview
(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/CQCDoc...=/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.
Pages: 1 2 3