java - Apache HTTPClient HttpGet returning nothing -


I am requesting a GET with version 4.3.3 of Apache HTTPER, such as:

  HttpGet httpGet = New HttpGet ("http://www.revenue.ie/en/tax/it/forms/med1.pdf"); CloseableHttpClient Client = HttpClients.createDefault (); CloseableHttpResponse response = client.execute (httpGet); Client.close ();   

The response status code tells me 200, and the content length returned by response.getEntity (). GetContentLength () 1213954, but returned from the call as "InputStream" :

  response.getEntity (). GetContent ()   

reporting of 0 bytes is available.

I have been receiving such calls to successfully recover and parse the other URL's HTML but there is some difference in it because here is the file content in which I am interested? client.close ()

Tried to retrieve InputStream before reacting response.getEntity (). GetContent () .

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -