`#include
include
ESP8266WebServer esp8266_sever(80); const char* ssid="test"; const char* passwd="12345678"; void ROOT(void) { esp8266_sever.send(200,"text/plain","hahahahah"); } void notroot(void) { esp8266_sever.send(200,"text/plain","not found"); } void setup() { Serial.begin(9600); WiFi.softAP(ssid,passwd); Serial.print(WiFi.localIP()); esp8266_sever.begin(); esp8266_sever.on("/",ROOT); esp8266_sever.onNotFound(notroot); Serial.print("OK");
}
void loop() { esp8266_sever.handleClient();
}`