title: Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes
body: <p>I am getting for the first time</p>
  <blockquote>
  <p>Caused by: java.io.IOException: HTTP/1.1 header parser received no bytes</p>
  </blockquote>
  <p>(my app seemed to work up to now...)</p>
  <pre><code>HttpClient httpClient = HttpClient.newHttpClient();
              HttpRequest httpRequest = HttpRequest
                      .newBuilder()
                      .GET()
                      .uri(URI.create(&quot;...&quot;))
                      .header(&quot;Content-Type&quot;, &quot;application/json&quot;)
                      .build();
  
              System.out.print(httpRequest.toString()); // dbg - it's ok
  
              HttpResponse&lt;String&gt; response = null;
              try {
                  response = httpClient.send(httpRequest,
                          HttpResponse.BodyHandlers.ofString());
              } catch (IOException | InterruptedException e) {
                  e.printStackTrace();
              }
  
              if (response != null &amp;&amp; response.statusCode() == 200) {
                  JSONObject jsonObject = new JSONObject(response.body());
                  JSONArray jsonArray = jsonObject.getJSONArray(&quot;data&quot;);
                  ObjectMapper objectMapper = ObjectMapperCreator.getNewObjectMapper();
                  try {
                      if (jsonArray.length() &gt; 0) {
                          correctlyCaught = true;
                          return objectMapper.readValue(jsonArray.get(0).toString(), GeocodingResponse.class);
                      }
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              }
  </code></pre>
  <p>this is the code. Why am I getting this error?</p>