title: Can't iterate through HttpHeaders Map
body: <p>My IDE says</p>
  
  <blockquote>
    <p>Error: can only iterate over an array or an instance of java.lang.Iterable</p>
  </blockquote>
  
  <p>On the <code>headers.map()</code> in this code</p>
  
  <pre><code>import java.net.http.HttpHeaders;
  import java.net.http.HttpRequest;
  
  public static String dumpRequest(HttpRequest request)
  {
      HttpHeaders headers = request.headers();
      for (Map.Entry&lt;String, List&lt;String&gt;&gt; header : headers.map()) {
  
      }
  }
  </code></pre>
  
  <p>However the documentation of the <code>map()</code> in my IDE says it returns a <code>Map&lt;String, List&lt;String&gt;&gt;</code> , what am I missing ? please consider I'm very new to JAVA</p>
  
  <p>I'm using JAVA 14</p>
  
  <p>This is the documentation of <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpHeaders.html" rel="nofollow noreferrer">HttpHeaders</a> that I'm using</p>