Getting error invalid conversion from 'const char*' to 'const uint8_t*
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)