HTTP Post

20 views
Skip to first unread message

chadgw...@gmail.com

unread,
Jan 7, 2018, 8:10:39 PM1/7/18
to ImSmart.tech
How can I do a POST in a trigger script / module?

I get the error "ReferenceError: XMLHttpRequest is not defined"


Chad

Paul Dubé

unread,
Jan 7, 2018, 9:43:05 PM1/7/18
to ImSmart.tech
Hi Chad,

Right now there is no way to POST. The only way to send an http request is to use the function http as defined in https://www.imsmart.tech/Content/ProgrammersGuide.html but that would be a GET method and not POST.

I can definitely put this in the suggestion list for future features.

Paul

chadgw...@gmail.com

unread,
Jan 7, 2018, 11:04:35 PM1/7/18
to ImSmart.tech
Thank you. I developed a Blynk connector which I am happy to publish. It only has a way to write a change to a pin but I also wanted to add in support for sending a push notification. The only way to do so would be with a post. Blynk primarily supports POST and PUT. The workaround is to send an event to IFTTT and then have it make the web request, which is not ideal.

Paul Dubé

unread,
Jan 7, 2018, 11:06:06 PM1/7/18
to ImSmart.tech
I understand. I'll keep you posted as soon as I make other methods available.

Reply all
Reply to author
Forward
0 new messages