What does HTTP stand for?
HyperText Transfer Protocol.
What are the main roles in HTTP?
Client (browser) requests and displays web objects; Server sends objects in response.
Which RFCs define HTTP/1.0 and HTTP/1.1?
HTTP/1.0: RFC 1945, HTTP/1.1: RFC 2068.
What is the structure of an HTTP request message?
Request line (method, URL, version), header lines, and an optional entity body.
Is an HTTP request human-readable?
Yes, it’s ASCII text format.
What marks the end of an HTTP message?
A blank line (carriage return + line feed).
List the common HTTP methods.
GET, POST, HEAD, PUT, DELETE.
What does the GET method do?
Retrieves a file specified in the URL path.
What does the POST method do?
Sends data enclosed in the entity body as input to the specified resource.
What does the HEAD method do?
Requests headers only (no body) to check metadata.
What does the PUT method do?
Uploads a file in the entity body to the path specified in the URL.
What does the DELETE method do?
Deletes the file or resource specified in the URL field.
How is input uploaded using the GET method?
As parameters encoded into the URL field.
How is input uploaded using the POST method?
As data in the request’s entity body.
What does a sample HTTP POST request include?
A request line, headers (Host, Content-type, etc.), and form data in the body (e.g., Account=…&State=…).
What is the structure of an HTTP response?
Status line (version, status code, phrase), header lines, and data (body).
Give an example of a status line.
HTTP/1.1 200 OK.
List common HTTP status codes.
200 OK, 301 Moved Permanently, 400 Bad Request, 404 Not Found, 505 HTTP Version Not Supported.
What does status code 200 mean?
Request succeeded; the requested object follows in the message.
What does status code 301 mean?
The requested object has been moved; new location is in the Location header.
What does status code 400 mean?
Bad Request — the message could not be understood by the server.
What does status code 404 mean?
Not Found — the requested document doesn’t exist on the server.
What does status code 505 mean?
HTTP Version Not Supported — the server doesn’t support the HTTP version used.
What port does HTTP use?
Port 80 by default.