Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Additional HTTP REST commands requested
#1
So I have been playing around with a lot of JSON as of late and noticed we have a System command for HTTP GET action like so:

System::HTTPGet
    P1=
    P2=
    P3=5


So that's very cool for some of the stuff I want to do however I was thinking that having the ability to also do HTTP PUT & POST (Possibly PATCH and DELETE) methods as well.  Not sure what this would take to be added but thinking this could be very helpful for anyone trying to interact with CQC unsupported devices that may use a REST API.

Currently I am just using cURL from cygwin to handle these actions but this requires me to have cygwin installed on all my IV's and CQC boxes.  Not a huge issue but still having this functionality as a direct action from cqc would be more robust.

Thoughts?
Reply
#2
Generally for that sort of stuff you need to do it in CML. You can write a CML macro and invoke it from an action, passing in the info you want. It could get sort of messy getting the parameters formatted out correctly for POST operations. That stuff is way easier to do in CML, where there are lots of helper methods to get all the data correctly set up.
Dean Roddey
Explorans limites defectum
Reply
#3
Fair enough Dean, let me try and dig into the macro option for that and I'll see how it goes!

Thanks,

Todd
Reply
#4
You can find various examples I've posted around here if you search for HTTP and CML probably.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Get Field Value via HTTP znelbok 3 1,259 06-11-2020, 03:43 PM
Last Post: Dean Roddey
  HTTP Trigger and Parameters znelbok 1 1,008 06-11-2020, 03:41 PM
Last Post: Dean Roddey
  Additional MQTT Support znelbok 5 2,018 05-14-2020, 03:55 PM
Last Post: Dean Roddey
  HTTP SendPUT simplextech 3 1,543 01-21-2020, 03:05 PM
Last Post: simplextech
  CQC HTTP Events? bjkiller 26 8,824 01-11-2020, 07:27 AM
Last Post: simplextech
  Set value via HTTP Call simplextech 2 1,250 01-07-2020, 04:39 PM
Last Post: simplextech
  HTTP Trigger Driver - see trained URL's? Shaky 1 1,707 09-15-2019, 12:25 PM
Last Post: Dean Roddey
  Can't Find a Couple of Documented Action Commands kblagron 7 3,908 10-02-2018, 05:47 PM
Last Post: kblagron
  HTTP Get driver not working znelbok 10 5,389 08-28-2018, 10:10 AM
Last Post: Dean Roddey
  Http Post zra 17 7,076 08-05-2018, 01:55 PM
Last Post: zra

Forum Jump:


Users browsing this thread: 1 Guest(s)