An HTTP Response is the server’s reply to an HTTP request. It contains the requested information or status of the requested action.
Components of an HTTP Response:
- Status line (includes status code)
- Headers (metadata about the response)
- Body (optional, contains requested data)
Common Status Codes:
- 200 OK: The request was successful.
- 301 Moved Permanently: Resource has a new URL.
- 404 Not Found: The requested resource does not exist.
- 500 Internal Server Error: A server-side error occurred.
Responses may include various types of data, such as HTML, JSON, or binary files, depending on the request and server configuration.
