HTTP (methods, status code, & headers) Flashcards

1
Q

Used by HTTP request messages in the request line.

A

Methods

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

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
3
Q

HTTP methods are sometimes called ________ because of the verb-like naming scheme.

A

HTTP Verbs

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

Used to request a specific resource from the server.

A

GET

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

Method meant to be read only, and not modify the server’s state.

A

GET

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

Used to submit data to a server.

A

POST

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

Acording to W3C, POST is designed to cover 4 functions:

A
  • annotation of existing resources
  • posting a message to board
  • providing a block of data
  • extending a database through an append operation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Unlike GET, POST requests often result in some ____________ in the server.

A

state change

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

The expected response of this is identical to a response to a GET request with the same path, headers, etc. but without the response body.

A

HEAD

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

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
11
Q

Replaces 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
12
Q

Deletes the resource in the specified path

A

DELETE

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

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
14
Q

Used to echo the contents of an HTTP Request back to the client.

A

TRACE

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

Useful for checking how the request is modified by proxies on its way to the server.

A

TRACE

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

Used to ask the server about its supported methods.

A

OPTIONS

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

Can be used to ask what methods are supported by the server in total or what methods are supported for specific resources in the server.

A

OPTIONS

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

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
19
Q

HTTP Methods that correspond to CRUD operations.

A

PUT
GET
POST/PATCH
DELETE

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

To ensure compatibility between servers and their clients, all parties are expected to ____________________.

A

stick to the defined conventions.

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

What are the three characteristics of HTTP Methods.

A

Safe
Idempotent
Cacheable

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

Methods that do not alter the state of the server. In other words, a read-only operation.

A

Safe Methods

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

These methods when applied several times do not change the result of the initial application.

A

Idempotent

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

Methods that leave the server in the same state whether the request was done once or repeated several times.

A

Idempotent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
All ______ methods are also idempotent since they don't change the server's state.
26
If this methods is used in the request, the response is considered cacheable.
Cacheable
27
Only ____ and _____ methods are cacheable.
HEAD and GET
28
A 3-digit code found in the first line of HTTP response messages.
HTTP Status Code
29
Indicates whether a request was successful or not (and why).
Status Code
30
Each status code has a corresponding ______ or ________ that it included next to the status code.
Reason Phrase or Status Message
31
Status codes can be classified into 5 groups, what are they?
100-199: Informational 200-299: Success 300-399: Redirection 400-499: Client Error 500-599: Server Error
32
These indicate that the client's request was successfully received, understood, and processed.
200 range - success
33
The request has succeeded. The meaning varies depending on the HTTP Method of the request.
200 - OK
34
The request was a success and a new resource was a created as a result
201 - Created
35
Indicate that further action needs to be taken by the client in order for the request to be processed.
300 range
36
The URL requested refers to multiple resources. This code is returned with a list of options the client can select from.
300 Multiple Choices
37
The resource has been moved to a different URL. The new URL is indicated by the Location header in the response.
301 Moved Permanently
38
Like 301 but the move is temporary. Browsers redirect to the temporary URL but crawlers don't update their databases.
302 Found
39
The resource hasn't been modified iso there's no need to retransmit the data. Refer to a cached copy instead.
304 Not Modified
40
These indicated that the server failed to process the request and that the client is the cause of the error.
400 - error
41
These are usually caused by badly formed requests or nonexistent URLs
400 - error
42
The client sent a request message with invalid syntax.
400 - Bad Request
43
The request was not acted upon because it lacks valid authentication credentials.
401 Unauthorized
44
The server understood the request but will not authorize it
403 - Forbidden
45
There is no resource found in the specified URL
404 Not Found
46
The method used in the request isn't supported for the specified resource
405 - Method Not Allowed
47
Access to the target resource is no longer available
410 - Gone
48
The client sent an entity body larger than the sever can or wants to process.
413 Request Entity Too Large
48
The client sent a request with a URL longer than the server can or wants to process.
414 Request URI Too Long
48
The content type of the request payload is not supported by the server
415 Unsupported Media Type
48
These indicated that the server failed to process the request and that the server was the cause of the error.
500 - server errors
49
Common causes: server limitations, error in server components, proxy errors.
500 - server errors
49
Generic server error message. The server encountered an error but can't give a more specific status code.
500 Internal Error
50
The server does not support the functionality to fulfill the request.
501 Not Implemented
50
The server does not recognize the request method at all.
501 Not Implemented
50
The server isn't ready to handle the request. Commonly request by server overload or server maintenance.
503 Service Unavailable
51
The server can use the Retry-After to indicate how much time the client should wait before trying again.
503 Service Unavailable
51
The server couldn't get response in time from the next entity.
504 Gateway Timeout
51
The server doesn't support the HTTP version used in the request message.
505 HTTP Version Not Supported
51
These provide additional info about the request, but not info about whether the request was a success or fail.
100 - Informational
51
The client should continue with the request or ignore the response if it's already finished.
100 Continue
51
The server is switching protocols requested by the client.
101 Switching Protocols.
52
This header specify to switch to the protocol requested by the client.
Upgrade Header
52
Allow the client and server to pass additional information in request and response messages.
Headers
53
Work together to determine what clients and servers do.
Headers and Methods
54
Give additional context to status codes.
Headers
54
Used by both request and response messages.
HTTP Headers
54
4 types of Headers
General Headers Request Headers Response Headers Entity Headers
55
Can be used for both request and response messages.
General Headers
55
They contain general information that does not apply to the contents of the message body.
General headers+
55
Examples of General Headers
Date, Cache-Control, Conenction
55
Used only in request messages.
Request Headers
55
May contain info about the resource requested, or the client itself.
Request Headers
55
Examples of Request Headers
Accept Accept-Charset Accept-Encoding Accept-Language
56
Request header where client request a new copy of the resource if it has been modified since the specified date.
If-Modified-Since
56
Details about the browser, rendering engine, PS. architecture
User-Agent
57
Cookies set by the server
Cookie
57
Used to give more detailed information about the response
Response Headers
57
How much time the response has been in a proxy cache.
Age
57
Indicates the redirection URL. Used in conjunction with 300 range codes
Location
57
Details about the server's software
Server
57
Can be used by both request and response messages.
Entity Header
57
The only header to describe the content of the message body
Entity Header
58
Contain information about the payload such as:
Content Length Language Encoding Type Location Date of last modification
58
Can be used by clients and servers to negotiate what kind of resource is sent between them.
Conditional Request Headers and entity headers.
58
Value of the content-type header indicates the ___________ of the payload content.
MIME Type
58
Helps the receiving entity decide what to do with the data.
Multipurpose Internet Mail Extension
58
Sample MIME Types
Text/css Text/html application/zip application/powerpoint application/pdf
58
HTTP is meant to be ________. Developers can make up their own headers, status codes, or methods. Though this might cause interoperability issues.
Extensible