I found the solution, following is the implementation
Created a separate class file with all the HTTP header maps shown below example
package
webapps;
import io.gatling.javaapi.http.HttpProtocolBuilder;
import java.util.Map;
import static io.gatling.javaapi.http.HttpDsl.http;
public final class headers {
public static final Map<CharSequence, String> headers_90 = Map.ofEntries(
Map.entry("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"),
Map.entry("Upgrade-Insecure-Requests", "1")
public static final Map<CharSequence, String> headers_91 = Map.ofEntries(
Map.entry("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"),
Map.entry("Upgrade-Insecure-Requests", "1")
....
);
In the main class, I have imported the above-mentioned class as shown below.
import static webapps.headers.*;
Now the main class file is readable.
Regards,
Bharath.