-->
Page 1 of 1

HTTP com dev2dev

PostPosted: Wed Jan 01, 2020 11:21 am
by Philippe Luyten
Hello and best wishes ;)
I use 2 NodeMCU with 2 different configurations.
The first is receiving a variable by HTTP.
This device is also AP.
The second should in theory send that variable also via HTTP.
When AP is active, I send a request via browser like:
http://192.168.4.1/Hello
then the first app receive correctly that variable: "Hello".
Unfortunately, the second app is not able to send the same variable via:
http.begin("http://192.168.4.1/"+String_to_send+'\n');
or
http.begin("192.168.4.1", 80, "/"+String_to_send+"\r");
(in that case String_to_send is "Hello")
I try some other combination bur without any success :?
If someone can help me?
Thanks a lot,
Phil

Re: HTTP com dev2dev

PostPosted: Fri Jan 10, 2020 2:20 am
by jamestinker
Create a local variable by initialize local name to in fix block and name it a. Now drag out a set block and place it outside of the initialize local name to in do block. Click on the dropdown of the set block.