Error initializer-string for array of chars is too long using ESP32 Webserver i tried to use an asynchronic webserver for a new project with friends using this tutorial.
We want to run an FFT while also changing some settings via the webserver. Since the tutorial only put code in the setup() i thought it would be good for performance.
When i just copy paste the code it works pretty ok, but then i wanted to change everything into classes like a good boy. Now i get this error:
 In file included from sketch\webserver.cpp:2:0:
webserver.h:36:29: error: initializer-string for array of chars is too long [-fpermissive]
   const char index_html[] = R&quot;rawliteral(
                             
sketch\webserver.cpp: In constructor 'webserver::webserver()':
webserver.cpp:4:22: error: initializer-string for array of chars is too long [-fpermissive]
 webserver::webserver() {

I tried to search for a solution, but all the other problems with this type of error, didnt seem to fit with my problem.
This is the header file where the char string is declared
#ifndef webserver_h
#define webserver_h

#include &quot;Arduino.h&quot;
#include &quot;ESPAsyncWebServer.h&quot;
#include &quot;AsyncTCP.h&quot;
#include &lt;WiFi.h&gt;

class webserver {
  
  private:
  // Insert Private Variables And Functions
  
   // Replace with your network credentials
  const char* ssid     = &quot;ESP32-Todesstern&quot;;
  const char* password = &quot;CaptainHook&quot;;

  const char* PARAM_INPUT_1 = &quot;input1&quot;;
  const char* PARAM_INPUT_2 = &quot;input2&quot;;
  const char* PARAM_INPUT_3 = &quot;input3&quot;;
  
  // Set web server port number to 80
  AsyncWebServer server(int port);
  
  // Variable to store the HTTP request
  String header;

  IPAddress IP;
  //WiFiClient client;

  public: 
  //Insert Public Variables and Functions
  webserver();
  
  String music_state;

  const char index_html[] PROGMEM = R&quot;rawliteral(
  &lt;!DOCTYPE HTML&gt;&lt;html&gt;&lt;head&gt;
    &lt;title&gt;ESP Input Form&lt;/title&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;
    &lt;/head&gt;&lt;body&gt;
    &lt;form action=&quot;/get&quot;&gt;
      input1: &lt;input type=&quot;text&quot; name=&quot;input1&quot;&gt;
      &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;
    &lt;/form&gt;&lt;br&gt;
    &lt;form action=&quot;/get&quot;&gt;
      input2: &lt;input type=&quot;text&quot; name=&quot;input2&quot;&gt;
      &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;
    &lt;/form&gt;&lt;br&gt;
    &lt;form action=&quot;/get&quot;&gt;
      input3: &lt;input type=&quot;text&quot; name=&quot;input3&quot;&gt;
      &lt;input type=&quot;submit&quot; value=&quot;Submit&quot;&gt;
    &lt;/form&gt;
  &lt;/body&gt;&lt;/html&gt;
  )rawliteral&quot;;

  void setup_server(AsyncWebServer server);

  void notFound(AsyncWebServerRequest *request);
 
};

#endif

Thanks for the Help,
Xenoshell
Please check the readme: https://github.com/me-no-dev/ESPAsyncWebServer#send-large-webpage-from-progmem
You probably have to declare it in progmem without rawliteral.
const​ ​char​ index_html[] PROGMEM = ​&quot;​...​&quot;​; ​//​ large char array, tested with 14k​ request-&gt;​send_P​(​200​, ​&quot;​text/html​&quot;​, index_html);