> Simple browser assignment in Java?

Simple browser assignment in Java?

Posted at: 2014-12-18 
For http://answers.yahoo.com:

GET / HTTP/1.1\r\n

Host: answers.yahoo.com\r\n

Connection: close\r\n

\r\n

The single / says "root directory".

I have an assignment to create a very simple GUI browser in java. Basically, all it is is a frame with a text box that allows the user to enter a URL, and then it sends these three lines to the server:

GET HTTP/1.1\r\n

Host: \r\n

\r\n

If there is no filepath specified, such as "https://answers.yahoo.com" what should the first line say? Just "GET HTTP/1.1"? Or is this assignment set up to only work with URLs with filepaths? I keep getting Bad Request errors from the server when there is no filepath.