title: Apache httpclient GET file from local filesystem?
body: <p>I somehow always thought that this should be possible: </p>
  
  <pre><code>val client = HttpClients.createDefault()
  val httpGet = new HttpGet("file:///Users/user01/testfile")
  client.execute(httpGet)
  </code></pre>
  
  <p>which throws: </p>
  
  <pre><code>client: org.apache.http.impl.client.CloseableHttpClient = org.apache.http.impl.client.InternalHttpClient@4ba3987b
  httpGet: org.apache.http.client.methods.HttpGet = GET file:///Users/user01/testfile HTTP/1.1
  org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: file:///Users/user01/testfile
      at org.apache.http.impl.client.CloseableHttpClient.determineTarget(test_ws.sc0.tmp:90)
      at org.apache.http.impl.client.CloseableHttpClient.execute(test_ws.sc0.tmp:78)
      at org.apache.http.impl.client.CloseableHttpClient.execute(test_ws.sc0.tmp:103)
      at #worksheet#.#worksheet#(test_ws.sc0.tmp:6)
  </code></pre>
  
  <p>which kind of makes sense as I am creating an <code>HttpGet</code> instance. </p>
  
  <p>Does anybody know how this can be done? </p>