HTTP (Method, Status Codes, and Headers) Flashcards

1
Q

These are used by HTTP request messages in the request line. It indicates the desired action for the specified resource.

A

Method

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

Methods are sometime called as?

A

HTTP Verbs

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

This method is used to request a specific resource from the server. These request are meant to be read only, and not modify the server’s state.

A

Get Method

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

This method is used to submit data to a server.

It serves four function:

  1. Annotation of existing resources
  2. Posting a message to a bulletin board, newsgroup, mailing list, etc
  3. Providing a block of data, such as the result of submitting a form, to a data-handling process.
  4. Extending a database through an append operation

Unlike GET, it often results in some state change in the server.

A

POST

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

The expected response of this method is identical to a response to a Get request with the same path, headers, etc. but without the response body. It is used for checking link validity, recent modification, or just to find out more about the resource without actually fetching it.

A

HEAD

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

This method replaces a current resource in the specified path with the data in the request body.

A

PUT

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

This method deletes the resource in the specified path.

A

DELETE

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

This method is used by the client to establish a connection to the server over a tunnel proxy

A

CONNECT

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

This method is used to echo the contents of an HTTP Request back to the client. It is generally for debugging.

A

TRACE

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

This method is used to ask the server about its supported methods. It can be used to ask what methods are supported by the server in total.

A

OPTIONS

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

This method is used to apply partial modification to the data in the specified url

A

PATCH

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

One characteristic of an HTTP method is through? These do not alter the state of the server. (read only operation)

A

Safe Methods

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

One characteristic of an HTTP method is through? These method exhibit Idempotency

A

Idempotent Methods

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

This property of certain operations such that they can be applied several times without changing the result of the initial application.

A

Idempotency

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

True or False? All safe methods are no idempotents since they change the server’s state

A

False

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

In this method, only head and get are cacheable. If the method used in the request is cacheable, then the response is considered cacheable.

A

Cacheable Methods.

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

200 OK

MEANING IN GET, HEAD, AND DELETE?

A

GET: The resource was fetched and is in the response body.

HEAD: The entity headers are in the response

DELETE: The resource at the specified URL was deleted.

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

201 Created

What is the meaning?

A

The request was a success and a new resource was treated as a result (e.g. in response to PUT)

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

What range in status code indicate neither failure nor success. It indicates that further action needs to be taken by the client in order for the request to be processed. A common cause is the need for clients to use alternate locations for their requested resource

A

300 Range

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

What does 300 Multiple Choices mean?

A

The URL requested refers to multiple resources. This code is returned with a list of options the client can select from.

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

301 moved permanently means?

A

The resource has been moved to a different URL. The new URL is indicated by the location header in the response.

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

302 found means?

A

It is like 301, but the move is temporary. Browsers redirect to the temporary URL but crawlers don’t update their databases

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

304 Not modified means?

A

The resources hasn’t been modified so there’s no need to transmit the data. refer to a cached copy instead

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

what usually causes 400 range?

A

Caused by badly formed requests or nonexistent URLs.

25
Q

When the syntax is invalid what is returned?

A

400 Bad Request

26
Q

When the request was not acted upon becuase it lacks valid authentication credential it send what status code?

A

401 Unauthorized

27
Q

When the server understood the request but will not authorize it, what status code will be sent?

A

403 Forbidden

28
Q

When there is no resource found in the specified URL what status code is given?

A

404 Not found

29
Q

When the method used in the request isn’t supported for the specified resource, what status code is given?

A

405 Method not allowed

30
Q

When the access to the target resource is no longer available, what status code is given?

31
Q

When the client sent an entity body larger than the server can or wants to process, what status code is given?

A

413 Request Entity Too Large

32
Q

When the client sent a request with a URL longer than the server can or wants to process, what status code is given?

A

414 Request URI Too Long

33
Q

When the content type of the request payload is not supported by the server, what status code is given?

A

415 Unsupported Media Type

34
Q

What is the common cases for 500 range status code to show?

A

Server limitations, error in server components, proxy errors.

35
Q

When the server encountered an error but can’t give a more specific status code, what status code is given? It is a generic server error message.

A

500 Internal Error

36
Q

When the server does not support the functionality to fulfill the request. Use Case: the server doesn’t recognize the request method at all.

A

501 Not Implemented

37
Q

When the server isn’t ready to handle the request. It is commonly caused by server overload or server maintenance. Used for temporary conditions

A

503 Service Unavailable

38
Q

What can the server use to indicate how much time the client should wait before trying again in 503 service unavailable?

A

Retry After header

39
Q

When the server, acting as a proxy, couldn’t get a response in time from the next entity, what status code is shown?

A

504 Gateway Timeout

40
Q

When the server doesn’t support the HTTP version used in the request message, what status code is given?

A

505 HTTP Version Not Supported.

41
Q

In a 101 switching protocol, when the server is switching to the protocol requested by the client, it is specified by what header?

42
Q

When the client should continue with the request or ignore the response if it’s already finished, what status code should be given?

A

100 Continue

43
Q

This allow the client and server to pass additional information in request and response message. It work with methods to determine what clients and servers do. It also gives additional context to status codes.

44
Q

Who uses HTTP headers?

A

request and response messages

45
Q

This type of header can be used for both request and response messages. They contain general information that does not apply to the contents of the message body.

A

General Header

46
Q

This type of header are only used in request messages. They also don’t relay to contents of the request message body. They may contain the resource requested, or the client itself

A

Request Header

47
Q

Here, clients requests a new copy of the resource if it has been modified since the specified date. If the resources hasn’t been modified, client receives 304 and uses a cached copy instead.

A

If-modified-Since

48
Q

This type of header us used to give more detailed information about the response. They don’t relate to the message body content either.

A

Respond Header

49
Q

This refers how much time (in seconds) the response has been in a proxy cache

50
Q

This indicates the redirection URL. It is used in conjunction with 300 range codes.

51
Q

This type of header can be used by both request and response messages. They describe the content of the message body

A

Entity Header

52
Q

The value of the Content-Type header indicates what of the payload content?

53
Q

The multipurpose internet mail extension or Mime helps in?

A

the receiving entity decide what to do with the data.

54
Q

In the MIME type, what is for design/layout?

55
Q

in the mime type, what is for rendering the doc as HTML

56
Q

in the mime type what is used to open a download prompt?

A

application/zip

57
Q

in the mime type what are used to display as a document?

A

application/powerpoint
application/pdf

58
Q

Is HTTP meant to be extensible?