HTTP Basics Flashcards
What does HTTP stand for?
HyperText Transfer Protocol
What is HTTP?
It is a critical protocol used to transfer data across the web.
How many types of headers did the first version of HTTP have?
One => GET which requests a page from a server.
BONUS: The response from the server was always an HTML page.
What was the first version of HTTP?
Version 0.9
What is the current version and when was it last updated?
1.1 and last revised in 2014
Is HTTP a:
- Command and Response Text-Based protocol using client-server communication models.
- Request and Function-based protocol using cloud servers
- A protocol to keep your computer safe from viruses
- Request and Response Object-Oriented protocol using client-server communication models.
- Command and Response Text-Based protocol using client-server communication models.
HTTP is a stateless protocol. What does that mean?
That means that the server isn’t required to store session information, and each request is independent of the other.
Why are independent requests important in HTTP?
Because any type of data (file, binary, text, etc..) can be sent by HTTP. The only thing necessary is that server and client should know how to handle that request
What is the request and response message structure?
The request and response have the same structure as shown in the image.
What does a request consist of?
A command or request + optional headers + optional body content.
What does a response consist of?
A status code + optional headers + optional body content.
What is CRLF?
It stands for:
Carriage Return and Line Feed
and a simple CRL combination is used to delimit the parts, and a single blank line (CRLF ) indicates end of the headers.
If the request or response contains a message body then this is indicated in the header.
How is the start line of the request formatted?
Method + Resource Path + protocol version
Example: if we try to access the web page testpage.htm on www.testsite5.com
The the start line of the request would be
GET /testpage.htm HTTP/1.1
Where
GET is the method
/testpage.htm is the relative path to the resource.
HTTP/1.1 is the protocol version we are using
Does a relative path include the domain name?
NO
When we enter the URL what does the browser do with it?
It uses it to create the relative URI of the resource.
Note: URL (uniform resource Locator) is used for web pages. It is an example of a URI (uniform resource indicator).