Chat freely about anything...

User avatar
By kamal sonani
#41292 http://api.thingspeak.com/apps/thinghttp/send_request?api_key=UJDDO05P40P5XB7I

how to get back return value from this link using nodemcu?
ip-address and port for link = (80,184.106.153.149)

i try this but i cant resolve :| :|

conn=net.createConnection(net.TCP, 0)

conn:on("connection",function(conn, payload)
conn:send("HEAD / HTTP/1.1\r\n"..
"Host: https://api.thingspeak.com/apps/thinght ... L7DOCEHHX9\r\n"..
"Accept: */*\r\n"..
"User-Agent: Mozilla/4.0 (compatible; esp8266 Lua;)"..
"\r\n\r\n")
end)
conn:connect(80,184.106.153.149)
User avatar
By gaber
#41304 Try putting your IP address in quotes, and check if your host listed as HTTPS header is ok since you are using HTTP -- server may reject it.
Also, the conn:on("connect"... I thought had some problem--I could not get it working before..
Not sure if you have been looking at the docs here, but check this out http://nodemcu.readthedocs.org/en/dev/en/
User avatar
By kamal sonani
#41341
gaber wrote:Try putting your IP address in quotes, and check if your host listed as HTTPS header is ok since you are using HTTP -- server may reject it.
Also, the conn:on("connect"... I thought had some problem--I could not get it working before..
Not sure if you have been looking at the docs here, but check this out http://nodemcu.readthedocs.org/en/dev/en/



i just try with it but i cant get any response from web yet>>
[url]api.thingspeak.com/apps/thinghttp/send_request?api_key=UJDDO05P40P5XB7I[/url]
i what get back value from this link
just check at once on your own web