Help Esp8266 send message & get the sensor value (via http

In this example, the App requests data from the ESP8266 and it sends it to it, maybe you can get some idea.