The HTTP response headers contain information specific to the needs of the response, such as the location (used to redirect the client to a new URI). One of the more important response headers is WWW-Authenticate used in conjunction with status 401 (unauthorized). This is how web sites are able to prompt for usernames and passwords without using any backend processing logic (a browser user sees the browser prompting for a username and a password). This uses a challenge/response system. RFC 2617 outlines two methods for this authentication: basic (which uses cleartext usernames and passwords) and digest (which uses MD5 hashes). If you really want an exercise in learning the basics, it is a fun project to write your own implementation of HTTP authentication without using any libraries, just text processing and basic math to recreate the MD5 algorithm.
I did this a long time ago in Perl, and working on that project was how I learned the guts of HTTP so well.
HTTP response is a message sent by the server back to the client after having received and interpreted a request message. The first line of that message consists of the protocol version followed by a numeric status code and its associated textual phrase.
HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1,
HttpStatus.SC_OK, "OK");
System.out.println(response.getProtocolVersion());
System.out.println(response.getStatusLine().getStatusCode());
System.out.println(response.getStatusLine().getReasonPhrase());
System.out.println(response.getStatusLine().toString());
stdout >
HTTP/1.1
200
OK
HTTP/1.1 200 OK