HTTP Flashcards

Introduction to HTTP

1
Q

What does the lock icon beside the URL in a web browser signify?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is HTTP and what does it stand for?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the main components of an HTTP request?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the most common HTTP methods and their purposes?

A

The common HTTP methods are GET (retrieve information), POST (send data to the server), PUT (update existing content), and DELETE (remove resources).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do HTTP status codes represent and what are their ranges?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is HTTPS and how does it differ from HTTP?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the key elements of an HTTP response?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are common HTTP status code groups and examples?

A

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).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Summarize the HTTP protocol and its significance.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the different versions of the HTTP protocol?

A

There are multiple versions of the HTTP protocol, with Versions 1.1 and 2.0 being the most commonly used.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What additional information do headers in an HTTP request provide?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does the HTTP method ‘GET’ differ from ‘POST’?

A

The ‘GET’ method retrieves information from a server, while the ‘POST’ method sends data to the server, typically for processing or storing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the purpose of ‘PUT’ and ‘DELETE’ methods in HTTP?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What do informational HTTP status codes represent?

A

Informational status codes (100-199) are provisional responses sent by the server before the actual response, with ‘100 Continue’ being a common example.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is indicated by successful HTTP status codes?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do redirection HTTP status codes function?

A

Redirection codes (300-399) inform the client that the requested resource has moved, with ‘301 Moved Permanently’ for permanent moves and ‘302 Found’ for temporary redirections.

17
Q

What do client error HTTP status codes imply?

A

Client error codes (400-499) indicate issues with the request, like bad syntax (‘400 Bad Request’), authentication required (‘401 Unauthorized’), or resource unavailability (‘404 Not Found’).

18
Q

What do server error HTTP status codes signify?

A

Server error codes (500-599) indicate failures on the server’s end, with ‘500 Internal Server Error’ being a common generic error status.

19
Q

What is the purpose of the path in an HTTP request?

A

The path in an HTTP request represents the location of the resource on the web server. For example, to request an image, the URL needs the full path to that file, like ‘example.com/images/image.jpg’.

20
Q

What does the path in an HTTP request represent?

A

The path represents the location of the resource on the web server.

21
Q

What is an example of a resource in HTTP?

A

An example of a resource can be an image file.

22
Q

How is a resource requested in HTTP?

A

A resource is requested via a URL.

23
Q

What must a URL contain to request a specific resource?

A

The URL must contain the full path to the resource.

24
Q

What is an example of a full path in a URL?

A

An example is ‘example.com/images/image.jpg’.

25
Q

Where is the resource located in the example ‘example.com/images/image.jpg’?

A

The resource is located on a web server.

26
Q

What type of file is being requested in ‘example.com/images/image.jpg’?

A

An image file is being requested.

27
Q

In HTTP, what does ‘example.com’ represent?

A

‘Example.com’ represents the domain of the server.

28
Q

What is the significance of ‘/images/’ in the URL ‘example.com/images/image.jpg’?

A

‘/images/’ is the directory on the server where the file is located.

29
Q

What does ‘image.jpg’ specify in the URL?

A

‘Image.jpg’ is the specific file name of the resource.

30
Q

Is the file name important in an HTTP request?

A

Yes, the specific file name is crucial for locating the resource.

31
Q

Can HTTP be used to request different types of files?

A

Yes, HTTP can request various file types, not just images.

32
Q

Does the path in the URL change based on the file type?

A

The path changes according to the location and name of the file, regardless of its type.

33
Q

Is the domain part of the HTTP path?

A

Yes, the domain is part of the path in the URL.

34
Q

What does the ‘.com’ indicate in ‘example.com’?

A

‘.Com’ is a top-level domain indicating a commercial entity.

35
Q

Are directories like ‘/images/’ mandatory in URLs?

A

Directories are used as needed to navigate to the specific resource location.

36
Q

Can a URL path have multiple directories?

A

Yes, a URL can include multiple directories in its path.

37
Q

What role does a web server play in HTTP requests?

A

The web server hosts the resources and responds to HTTP requests.

38
Q

Can HTTP requests specify actions other than retrieving a file?

A

Yes, HTTP requests can specify various actions like posting data or updating content.

39
Q

Does the structure of an HTTP request vary based on the action?

A

The structure of the request may vary slightly, but it always includes the method, path, and other necessary headers.