HTTP Flashcards
What is HTTP?
Hypertext Transfer Protocol? It is a stateless, application layer protocol for communicating between distributed systems
How can HTTP support communication between a variety of host and clients and a mixture of networks configurations?
It assumes very little about a particular system and does not keep state between different message exchanges
Why is HTTP a stateless protocol?
It assumes very little about a particular system and does not keep state between different message exchanges
What protocol is the basis of HTTP?
TCP/IP or any other reliable protocol
What are the versions of HTTP?
HTTP/1.0, HTTP/1.1 and HTTP/2
What are the main differences between HTTP/1.0 and HTTP/1.1?
Persistent connections, chunked transfer-coding, fine grained caching headers.
What URL stands for?
Uniform Resource Locator
What is a URL structure consisted of?
Protocol + Host + Port + Resource Path + Query: http://www.google.com:80/search?q=cats
What is the resource path of a URL?
It is the local path to the resource on the server
What is a HTTP verb?
The action that should be performed on the host
What are the request verbs?
GET, POST, PUT, DELETE, HEAD, TRACE, OPTIONS, CONNECT
What does the GET verb?
Fetch an existing resource. The URL contains all the necessary information the server needs to locate and return the resource
What does the POST verb?
create a new resource. PORT requests usually carry a payload that specifies the data for the new resource
What does the PUT verb?
Update an existing resource. The payload may contain the updated data for the resource
What does the DELETE verb?
Delete an existing resource
Are PUT and DELETE specialized versions of the POST verb?
Yes. They may be packaged as POST requests with the payload containing the exact action: create, update or delete
What does the HEAD verb?
Similar to GET but without the message body. It is used to retrieve the server headers for a particular resource, generally to check if the resource has changed via timestamps
What does the TRACE verb?
Used to retrieve the hops that a request takes to round trip from the server. Each intermediate proxy or gateway would inject its IP or DNS name into the “Via” header field. This can be used for diagnostic purposes.
What does the OPTIONS verb?
Used to retrieve the server capabilities. On the client side it can be used to modify the request based on what the server can support
What does the CONNECT verb?
Stabilises a tunnel
What is a proxy?
It is a server that acts as an intermediary for requests from clients seeking resources from other servers.
What is a gateway?
Is a component that is part of two networks, which use different protocols. The gateway will translate one protocol into the other. A router is a special case of a gateway.