specifiy request type (GET) in SendtoHTTP

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
PeterKatana
Normal user
Posts: 7
Joined: 23 Mar 2020, 00:38

specifiy request type (GET) in SendtoHTTP

#1 Post by PeterKatana » 23 Mar 2020, 00:41

Dear all,

when I want to sent a Http request within the “Rules” tab (not within one of the http controllers) with SendtoHTTP is it possible to specify the type of request (in that case “GET”) ?

I want to set a value in a Blynk display field via the virtual pin:

SendToHTTP blynk-cloud.com,80,/xxxxxxxAPI-Tokenxxxxx/update/V3?value=%val1%

But in that case I need to send the http request as an GET request.

Any help is appreciated !

Br Peter

User avatar
ThomasB
Normal user
Posts: 614
Joined: 17 Jun 2018, 20:41
Location: USA

Re: specifiy request type (GET) in SendtoHTTP

#2 Post by ThomasB » 23 Mar 2020, 02:36

It appears that the SendtoHTTP method used in the rules defaults to HTTP GET. FWIW, I can't find a SendtoHTTP parameter that overrides it.

But perhaps the BlynkGet command (enabled by the Blync controller) is what should be used. I can't find much info on it's usage, but this old Github issue discussion has examples.
https://github.com/letscontrolit/ESPEasy/issues/838

- Thomas

PeterKatana
Normal user
Posts: 7
Joined: 23 Mar 2020, 00:38

Re: specifiy request type (GET) in SendtoHTTP

#3 Post by PeterKatana » 23 Mar 2020, 09:31

Hi Thomas,

thanks for the hint! I also found the Blynk controller but had no idea, how the controller can be used. But now I have an idea.

Br Peter

PeterKatana
Normal user
Posts: 7
Joined: 23 Mar 2020, 00:38

Re: specifiy request type (GET) in SendtoHTTP

#4 Post by PeterKatana » 23 Mar 2020, 10:36

Topic solved.

I used the BlynkGet command in the rules. Took me some time to find out how to address the sensor values in variables (should be in []) but now it works. Only issue is that the blynk server reports the the blynk page is offline - which is wrong because I can write values on the fields.

Thanks a lot Thomas !

TD-er
Core team member
Posts: 2334
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: specifiy request type (GET) in SendtoHTTP

#5 Post by TD-er » 23 Mar 2020, 11:27

Some controllers really need to be set to "check reply".
Maybe that's also needed for Blynk?

PeterKatana
Normal user
Posts: 7
Joined: 23 Mar 2020, 00:38

Re: specifiy request type (GET) in SendtoHTTP

#6 Post by PeterKatana » 23 Mar 2020, 19:20

I will try that out (check reply) !

Thanks

Br Peter

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests