This recipe will show you how to create a RESTful API hosted on the ESP8266 that will let API clients inquire about the status of the LEDs, as well as toggle them on and off. In previous recipes, we've seen how you can use MicroPython as a client to access RESTful web services.
Now, we will flip this around, and provide RESTful web services so that other devices and computers on the network can connect to the board and control its hardware. You will find this recipe very useful whenever you need to have other computers and devices on the network remotely connect to your projects and control components on them.