http client request and get return value
Posted: Wed Feb 17, 2016 12:02 pm
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)
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)