Correct Order for HTTP Request Line:
1. Request Method (e.g., GET, POST)
2. URI (Uniform Resource Identifier) (e.g., /index.html)
3. Protocol Version (e.g., HTTP/1.1)
Request Method
URI
Protocol Version
Comprehensive and Detailed Explanation:
Structure of an HTTP Request Message
An HTTP request message consists of:
1️⃣Request Line → Specifies the request method, the target resource (URI), andthe HTTP version.
2️⃣Headers → Provides additional request details (e.g., Host, User-Agent).
3️⃣Body (optional) → Used in methods like POST for sending data.
Format of an HTTP Request Line:
GET /index.html HTTP/1.1
GET → Request method
/index.html → URI (resource being requested)
HTTP/1.1 → Protocol version
Why Other Fields Are Incorrect?
❌Status Code → This belongs to an HTTP response, not a request.
❌Mixing Headers into the Request Line → Headers should be placed separately after the request line.
Submit