Getting error invalid conversion from 'const char*' to 'const uint8_t* I have written this sketch, and I am trying to populate the array of wifi hotspots to  set the value in html select using javascript dynamically.

#include &lt;Arduino.h&gt;
#include &lt;Hash.h&gt;
#include "ESP8266WiFi.h"
#include &lt;ESPAsyncTCP.h&gt;
#include &lt;ESPAsyncWebServer.h&gt;

const char* ap_ssid     = "ESP8266";
const char* ap_password = "0123456789";

// Create AsyncWebServer object on port 8080
AsyncWebServer ap_server(8080);


const char index_html[] PROGMEM = R"rawliteral(
&lt;!DOCTYPE HTML&gt;&lt;html&gt;
&lt;head&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;style&gt;
    html {
     font-family: Arial;
     display: inline-block;
     margin: 0px auto;
     text-align: center;
    }
    h2 { font-size: 3.0rem; }
    p { font-size: 3.0rem; }
    .units { font-size: 1.2rem; }
    .dht-labels{
      font-size: 1.5rem;
      vertical-align:middle;
      padding-bottom: 15px;
    }
  &lt;/style&gt;
  &lt;script&gt;
  var select = document.getElementById("wifi");
  hotspots = %wifi_networks%;
  for(index in hotspots) {
      select.options[select.options.length] = new Option(hotspots[index], index);
  }
&lt;/head&gt;
&lt;body&gt;
  &lt;h2&gt;Connect to a Wifi Networks&lt;/h2&gt;
  &lt;p&gt;
    &lt;form action="#"&gt;
  &lt;label for="wifi"&gt;Choose a hotspot to connect:&lt;/label&gt;
  &lt;select name="wifi" id="wifi"&gt;
    &lt;option value="volvo"&gt;None&lt;/option&gt;
  &lt;/select&gt;&lt;br&gt;
  &lt;label for="wifi"&gt;Enter password:&lt;/label&gt;
  &lt;input type="text"&gt;&lt;/input&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;input type="rescan" value="Rescan"&gt;
  &lt;input type="submit" value="Connect"&gt;
  &lt;/form&gt;
  &lt;/p&gt;
&lt;/body&gt;

&lt;/script&gt;
&lt;/html&gt;)rawliteral";


void setup() {
  Serial.print("Setting AP (Access Point)…");
  // Remove the password parameter, if you want the AP (Access Point) to be open
  WiFi.softAP(ap_ssid, ap_password);

  IPAddress IP = WiFi.softAPIP();
  Serial.print("AP IP address: ");
  Serial.println(IP);

  // Print ESP8266 Local IP Address
  Serial.println(WiFi.localIP());

  // Route for root / web page
  ap_server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) {
    request-&gt;send_P(200, "text/html", index_html, getWifiHotspots());
  });

  // Start server
  ap_server.begin();
}

void loop() {
  // put your main code here, to run repeatedly:

}


But I am geting this error 

    /Arduino/libraries/ESPAsyncWebServer/src/ESPAsyncWebServer.h:243:10: error:   initializing argument 4 of 'void AsyncWebServerRequest::send_P(int, const String&amp;, const uint8_t*, size_t, AwsTemplateProcessor)' [-fpermissive]

     void send_P(int code, const String&amp; contentType, const uint8_t * content, size_t len, 
AwsTemplateProcessor callback=nullptr);
          ^

exit status 1
invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]
In the library ESPAsyncWebServer.h are these two possible function variants defined

  void send_P(int code, const String&amp; contentType, const uint8_t * content, size_t len, AwsTemplateProcessor callback=nullptr);
   void send_P(int code, const String&amp; contentType, PGM_P content, AwsTemplateProcessor callback=nullptr);


So  when using

const char index_html[] PROGMEM = R"rawliteral(&lt;YOUR HTML here&gt;)rawliteral";


give the compiler the explicit instruction

ap_server.on("/", HTTP_GET, [](AsyncWebServerRequest * request) {
  request-&gt;send_P(200, "text/html", (const uint8_t*) index_html, getWifiHotspots());
 });


The code compiles error free on ArduinoIDE 1.8.12/ESP8266 2.71/ NodeMCUv1 (as not having your definition of getWifiHotspots() I defined it as char)