Web Requests - HTTP Methods and Codes Flashcards

1
Q

What is the purpose of HTTP methods?

A

To allow the browser to send information, forms, or files to the server.

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

What does the GET method do?

A

Requests a specific resource, with additional data passed via query strings.

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

What is the function of the POST method?

A

Sends data to the server, handling various types of input.

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

What does the HEAD method request?

A

Requests the headers that would be returned if a GET request was made.

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

What is the purpose of the PUT method?

A

Creates new resources on the server.

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

What does the DELETE method do?

A

Deletes an existing resource on the webserver.

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

What information does the OPTIONS method return?

A

Information about the server, such as accepted methods.

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

What does the PATCH method do?

A

Applies partial modifications to the resource at the specified location.

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

What type of request does a 200 OK status code indicate?

A

A successful request.

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

What does a 302 Found status code signify?

A

Redirects the client to another URL.

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

What does a 400 Bad Request status code indicate?

A

Encountering malformed requests.

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

What does a 403 Forbidden status code mean?

A

Client doesn’t have appropriate access to the resource.

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

What does a 404 Not Found status code indicate?

A

Requested resource does not exist on the server.

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

What does a 500 Internal Server Error status code signify?

A

The server cannot process the request.

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

Fill in the blank: The __________ method is commonly used for uploading data to a website.

A

POST

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

True or False: HTTP status codes can only indicate success or failure of requests.

17
Q

What are the five types of HTTP response codes?

A
  • 1xx
  • 2xx
  • 3xx
  • 4xx
  • 5xx
18
Q

What is the significance of the 1xx response codes?

A

Provides information and does not affect processing of the request.

19
Q

What is commonly relied upon by modern web applications?

A

GET and POST methods.

20
Q

What is the role of the PATCH method?

A

To apply partial modifications to a resource.

21
Q

What can lead to Denial of Service (DoS) when using the DELETE method?

A

Deleting critical files on the web server without proper security.

22
Q

Fill in the blank: The __________ status code is returned on a successful request.

23
Q

What are the two main HTTP methods used in REST APIs?

A
  • PUT
  • DELETE