Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CQC HTTP Events?
#21
(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.
Reply
#22
In the help it's Advanced Topics -> Implementing CML Bin. It has examples in there.
Dean Roddey
Explorans limites defectum
Reply
#23
(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?
Reply
#24
There shouldn't be an issue with that.
Dean Roddey
Explorans limites defectum
Reply
#25
(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.
Reply
#26
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
Dean Roddey
Explorans limites defectum
Reply
#27
(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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error trying to edit scheduled events George M 15 394 09-27-2020, 09:27 AM
Last Post: George M
  Get Field Value via HTTP znelbok 3 432 06-11-2020, 03:43 PM
Last Post: Dean Roddey
  HTTP Trigger and Parameters znelbok 1 292 06-11-2020, 03:41 PM
Last Post: Dean Roddey
  HTTP SendPUT simplextech 3 793 01-21-2020, 03:05 PM
Last Post: simplextech
  Set value via HTTP Call simplextech 2 601 01-07-2020, 04:39 PM
Last Post: simplextech
  Scheduled Events Caseta tom 18 2,658 12-22-2019, 07:06 AM
Last Post: Dean Roddey
  Editing Triggered Events Possibly Causing Kernel Panic/Crash gReatAutomation 6 1,268 11-08-2019, 01:10 PM
Last Post: Dean Roddey
  Possible Bug with Triggered Events gReatAutomation 3 817 09-19-2019, 02:41 PM
Last Post: gReatAutomation
  HTTP Trigger Driver - see trained URL's? Shaky 1 713 09-15-2019, 12:25 PM
Last Post: Dean Roddey
  Scheduled Events - Cannot find the specified path gReatAutomation 4 753 08-16-2019, 12:21 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)