1

Had a question about using Apache HTTPClient. I need to pull data from a website and found this useful tutorial https://hc.apache.org/httpclient-3.x/tutorial.html

In the tutorial it says we will write a simple application that "downloads a page".

Where exactly does it "download" the page to? I am not seeing mention of a database being set up so or some cloud storage or whatnot so where does the information "go" exactly (or where is it being held once the data is pulled)? I'm somewhat new to Java so this is a bit conceptual

1 Answer 1

1

The "download" goes to System.out:

  // Read the response body.
  byte[] responseBody = method.getResponseBody();

  // Deal with the response.
  // Use caution: ensure correct character encoding and is not binary data
  System.out.println(new String(responseBody));
Sign up to request clarification or add additional context in comments.

1 Comment

Awesome...thanks very much. I never thought of that before and always just used system.out.println without thinking about it. That actually solidified my understanding in terms of OOP and and engineering quite a bit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.