HTTP (Method, Status Codes, and Headers) Flashcards
(59 cards)
These are used by HTTP request messages in the request line. It indicates the desired action for the specified resource.
Method
Methods are sometime called as?
HTTP Verbs
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.
Get Method
This method is used to submit data to a server.
It serves four function:
- Annotation of existing resources
- Posting a message to a bulletin board, newsgroup, mailing list, etc
- Providing a block of data, such as the result of submitting a form, to a data-handling process.
- Extending a database through an append operation
Unlike GET, it often results in some state change in the server.
POST
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.
HEAD
This method replaces a current resource in the specified path with the data in the request body.
PUT
This method deletes the resource in the specified path.
DELETE
This method is used by the client to establish a connection to the server over a tunnel proxy
CONNECT
This method is used to echo the contents of an HTTP Request back to the client. It is generally for debugging.
TRACE
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.
OPTIONS
This method is used to apply partial modification to the data in the specified url
PATCH
One characteristic of an HTTP method is through? These do not alter the state of the server. (read only operation)
Safe Methods
One characteristic of an HTTP method is through? These method exhibit Idempotency
Idempotent Methods
This property of certain operations such that they can be applied several times without changing the result of the initial application.
Idempotency
True or False? All safe methods are no idempotents since they change the server’s state
False
In this method, only head and get are cacheable. If the method used in the request is cacheable, then the response is considered cacheable.
Cacheable Methods.
200 OK
MEANING IN GET, HEAD, AND DELETE?
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.
201 Created
What is the meaning?
The request was a success and a new resource was treated as a result (e.g. in response to PUT)
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
300 Range
What does 300 Multiple Choices mean?
The URL requested refers to multiple resources. This code is returned with a list of options the client can select from.
301 moved permanently means?
The resource has been moved to a different URL. The new URL is indicated by the location header in the response.
302 found means?
It is like 301, but the move is temporary. Browsers redirect to the temporary URL but crawlers don’t update their databases
304 Not modified means?
The resources hasn’t been modified so there’s no need to transmit the data. refer to a cached copy instead
what usually causes 400 range?
Caused by badly formed requests or nonexistent URLs.