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
Host:
\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.