HTTP Flashcards
Introduction to HTTP
What does the lock icon beside the URL in a web browser signify?
The lock icon indicates that HTTPS, the secure version of HTTP, is being used, ensuring secure communication between the web browser and the web server.
What is HTTP and what does it stand for?
HTTP, Hypertext Transfer Protocol, is a core protocol of the World Wide Web. It allows web browsers to communicate with web servers, transferring web resources like HTML documents, images, styles, and files.
What are the main components of an HTTP request?
An HTTP request consists of a method, path, version, and headers. The method indicates the action to be performed (e.g., GET, POST, PUT, DELETE), the path specifies the resource location, and headers provide additional request information.
What are the most common HTTP methods and their purposes?
The common HTTP methods are GET (retrieve information), POST (send data to the server), PUT (update existing content), and DELETE (remove resources).
What do HTTP status codes represent and what are their ranges?
HTTP status codes indicate the result of an HTTP request. They range from 100-599 and are grouped by purpose: Informational (100-199), Successful (200-299), Redirection (300-399), Client Error (400-499), and Server Error (500-599).
What is HTTPS and how does it differ from HTTP?
HTTPS is the secure version of HTTP, used for encrypted communication between computers. The main difference is that in HTTPS, content is encrypted before being sent, ensuring data security and privacy.
What are the key elements of an HTTP response?
An HTTP response includes headers and an optional message body containing response contents. It also has a status code and status message indicating the result of the HTTP request.
What are common HTTP status code groups and examples?
Common HTTP status codes include Informational (100 Continue), Successful (200 OK), Redirection (301 Moved Permanently, 302 Found), Client Error (400 Bad Request, 404 Not Found), and Server Error (500 Internal Server Error).
Summarize the HTTP protocol and its significance.
TTP is a protocol used for web data exchanges, transferring resources like HTML files. It operates through requests and responses, with HTTPS providing a secure version for data transmission.
What are the different versions of the HTTP protocol?
There are multiple versions of the HTTP protocol, with Versions 1.1 and 2.0 being the most commonly used.
What additional information do headers in an HTTP request provide?
Headers in an HTTP request contain extra details about the request and the client making the request, such as content type, language preferences, and other metadata.
How does the HTTP method ‘GET’ differ from ‘POST’?
The ‘GET’ method retrieves information from a server, while the ‘POST’ method sends data to the server, typically for processing or storing.
What is the purpose of ‘PUT’ and ‘DELETE’ methods in HTTP?
The ‘PUT’ method is used to update existing content on a web server, whereas the ‘DELETE’ method is used to remove resources from the server.
What do informational HTTP status codes represent?
Informational status codes (100-199) are provisional responses sent by the server before the actual response, with ‘100 Continue’ being a common example.
What is indicated by successful HTTP status codes?
Successful status codes (200-299) signify that the request was processed successfully, with ‘200 OK’ being the most common, indicating resource retrieval, successful transmission, or deletion.