05 - HTTP Methods, Status Codes, & Headers Flashcards

1
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
2
Q

methods are sometimes called ____

A

http verbs

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

POST is designed to cover 4 functions

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

identical to a response to a GET request but without the response body

A

HEAD

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

used for checking link validity, recent modification, or to find out more about a resource

A

HEAD

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

used 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

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

useful for checking how the request is modified by proxies

A

TRACE

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

what are the CRUD representation of the HTTP methods

A

create: put
read: get
update: post/patch
delete: delete

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

characteristics of http methods (3)

A

safe
idempotent
cacheable

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

do not alter the state of the server; read only

A

safe methods

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

exhibit idempotency

A

idempotent methods

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

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

all safe methods are also _____

A

idempotent

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

if the method used in the request is cacheable (GET) then the response is considered cacheable (HEAD)

A

cacheable methods

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

5 groups of status codes

A

1xx: informational
2xx: success
3xx: redirection
4xx: client error
5xx: server error

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

generic success message

A

200 OK

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

req was a success and a new resource was created as a result

A

201 Created

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

indicate that further action needs to be taken

A

3xx

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

url requested refers to multiple resources

A

300 Multiple Choices

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

resource has been moved to a different URL

A

301 Moved Permanently

26
Q

browsers redirected to the temporary URL but crawlers don’t update their databases

27
Q

resource hasn’t been modified so there’s no need to retransmit the data

A

304 Not Modified

28
Q

client sent a request message with invalid syntax

A

400 Bad Request

29
Q

request was not acted upon because it lacks valid authentication credentials

A

401 Unauthorized

30
Q

server understood the request but will not authorize it

A

403 Forbidden

31
Q

no resource found in the specified URL

A

404 Not Found

32
Q

method used in the request isn’t supported for the specified resource

A

405 Method Not Allowed

33
Q

access to the target resource is no longer available

34
Q

client sent an entity body larger than the server can or wants to process

A

413 Request Entity Too Large

35
Q

client sent a request with a URL longer than the server can or wants to process

A

414 Request URI too long

36
Q

content type of the request payload is not supported by the server

A

415 Unsupported Media Type

37
Q

common causes of server side errors (3)

A

server limitations
error in server components
proxy errors

38
Q

generic server error message

A

500 Internal Error

39
Q

server does not support the functionality to fulfill the request

A

501 Not Implemented

40
Q

server isn’t ready to handle the request usually due to server overload

A

503 Service Unavailable

41
Q

server couldn’t get a response in time from the next entity

A

504 Gateway Timeout

42
Q

server doesn’t support the HTTP version used in the request message

A

505 HTTP Version Not Supported

43
Q

client should continue with the request or ignore the response if it’s already finished

A

100 Continue

44
Q

server is switching to the protocol requested by the client

A

101 Switching Protocols

45
Q

allow the client and server to pass additional information

46
Q

4 types of headers

A

general
request
response
entity

47
Q

contain general information that does not apply to the contents of the message body

A

general headers

48
Q

may contain info about the resource requested or the client itself; only used in request msgs

A

request headers

49
Q

client requests a new copy of the resource if it has been modified since the specified date

A

if-modified-since

50
Q

details about the browser, rendering engine, os, architecture

A

user-agent

51
Q

cookies set by the server

52
Q

used to give more detailed information about the response

A

response headers

53
Q

how much time the response has been in a proxy cache

54
Q

indicates the redirection url

55
Q

details about the server’s software

56
Q

describe the content of the message body

A

entity header

57
Q

entity headers can contain information about the payload such as (6)

A

content length
language
encoding
location
type
date of last modification

58
Q

MIME

A

multipurpose internet mail extension

59
Q

help the receiving entity decide what to do with the data

A

MIME types

60
Q

MIME Types:
text/css
text/html
application/zip
application/powerpoint
application/pdf

A

Purpose:
for design/layout
render the doc as HTML
open a download prompt
display as a document
display as a document