Error: can only iterate over an array or an instance of java.lang.Iterable
On the headers.map() in this code
Код: Выделить всё
import java.net.http.HttpHeaders;
import java.net.http.HttpRequest;
public static String dumpRequest(HttpRequest request)
{
HttpHeaders headers = request.headers();
for (Map.Entry header : headers.map()) {
}
}
Я использую Java 14 < /p>
Это документация Httphaders, что я использую < /p>
Подробнее здесь: https://stackoverflow.com/questions/609 ... eaders-map