 void userHttpResponse(int n) {
   // You can talk to the ESP8266 and send a response here.
   if (req[n] == 1) {
-    //boolean ok = okCmd("AT+CWLAP\r\n");
     netsend_P(n, STATUS_200);
     netsend_P(n, headers_A);
     netsend_P(n, headers_B);
-    //netsend_P(n, HTML_INDEX);
     netsend_P(n, HTML_PART_A);
-    netsend(n, "title");
+    netsend_P(n, PSTR("Arduino httpd"));
     netsend_P(n, HTML_PART_B);
-    netsend(n, "body");
+    netsend_P(n, PSTR("Hello world!!"));
+    netsend_P(n, HTML_PART_C);
+    //snprintf(buff, sizeof(buff), "<p>Req=%d</p>\r\n", req[n]);
+    //netsend(n, buff);
+  } else if (req[n] == 2) {
+    while(waitData(500)) {
+      readLine();
+    }
+    send("AT+CWLAP\r\n");
+    delay(1000);
+    while(waitData(500)) {
+      readLine();
+    }
+    netsend_P(n, STATUS_200);
+    netsend_P(n, headers_A);
+    netsend_P(n, headers_B);
+    netsend_P(n, HTML_PART_A);
+    netsend_P(n, PSTR("Arduino httpd"));
+    netsend_P(n, HTML_PART_B);
+    netsend_P(n, PSTR("WiFi networks:<ul>"));
+    netsend_P(n, PSTR("<li>"));
+    netsend_P(n, PSTR("1"));
+    netsend_P(n, PSTR("</li>"));
+    netsend_P(n, PSTR("<li>"));
+    netsend_P(n, PSTR("2"));
+    netsend_P(n, PSTR("</li>"));
+    netsend_P(n, PSTR("</ul>"));
     netsend_P(n, HTML_PART_C);
     //snprintf(buff, sizeof(buff), "<p>Req=%d</p>\r\n", req[n]);
     //netsend(n, buff);

    DEBUG_SERIAL.println(buff);
    if (strncmp(buff, "/", BUFFER_SIZE)==0) {
      req[n] = 1;
    } else if (strncmp(buff, "/wifi", BUFFER_SIZE)==0) {
      req[n] = 2;
    }


    netsend_P(n, STATUS_404);
    netsend_P(n, headers_A);
    netsend_P(n, headers_B);
    netsend_P(n, HTML_PART_A);
    netsend_P(n, PSTR("ERROR 404: NOT FOUND!!"));
    netsend_P(n, HTML_PART_B);
    netsend_P(n, PSTR("ERROR 404: NOT FOUND!!"));
    netsend_P(n, HTML_PART_C);

  }
