What is the application layer?
the application layer is not theapplication itself, but rather a set of protocols which provide communication services to applications.
What do application layer protocols focus on?
Application layer protocols rely on the protocols at the layers below them to ensure that a message gets to where it is supposed to, and focus instead on the structure of that message and the data that it should contain.
What are the protocols used at the application layer?
There are a wide number of different application layer protocols for different use cases including HTTP, SMTP, FTP, etc.
What is a URI?
Uniform Resource Identifier(URI), is a string of characters which identifies a particular resource.
What is HTTP?
Hypertext Transfer Protocol(HTTP) is the set of rules which provide uniformity to the way resources on the web are transferred between applications.
What model of communication does HTTP use?
HTTP follows a simple model where a client makes arequestto a server and waits for aresponse. Hence, it’s referred to as arequest response protocol
What is DNS?
The Domain Name System provides a way to look up unknown server IP addresses.
What steps does DNS use?
What does it mean for a protocol to be stateless?
A protocol is said to bestatelesswhen it’s designed in such a way that each request/response pair is completely independent of the previous one. HTTP is a stateless protocol.
What affect is caused by HTTP being stateless?
Because of HTTPs statelessness, it is challenging to build stateful web applications
What is a url?
Uniform Resource Locator orURL, is the most frequently used part of the general concept of a Uniform Resource Identifier orURI, which specifies how resources are located.
What are the components of the URL:
HTTP://www.example.com:88/home?item=book
http: Thescheme. It always comes before the colon and two forward slashes and tells the web client how to access the resource. In this case it tells the web client to use HTTP to make a request.www.example.com: Thehost. It tells the client where the resource is hosted or located.:88: Theportor port number. It is only required if you want to use a port other than the default./home: Thepath. It shows what local resource is being requested. This part of the URL is optional.?item=book: Thequery string, which is made up ofquery parameters. It is used to send data to the server. This part of the URL is also optional.What are query strings?
It is used to send data to the server as part of the URL
What is URL encoding?
URLs are designed to accept only certain characters in the standard 128-characterASCII character set. Reserved or unsafe ASCII characters have to be encoded.
URL encoding replaces these non-conforming characters with a%symbol followed by two hexadecimal digits that represent the equivalent UTF-8 character.
What are the limitations of query strings?
&cannot be used with query strings. They must be URL encoded, which we’ll talk about next.When must characters be URL encoded?
%is unsafe since it is used to encode other characters. Other unsafe characters include spaces, quotation marks, the#character,<and>,{and},[and], and~, among others./,?,:,@, and&are all reserved and must be encoded. For example&is reserved for use as a query string delimiter.:is also reserved to delimit host/port components and user/password.What are the 2 main HTTP request methods?
GET & POST
What is a GET request used for?
What is an HTTP POST request used for?
POSTis used when you want to initiate some action on the server, or send data to a server.
TheHTTPbody contains the data that is being transmitted in an HTTP message and is optional. You can think of the body as the letter enclosed in an envelope, to be posted.
What are HTTP headers?
HTTP headers allow the client and the server to send additional information during the HTTP request/response cycle. Headers are colon-separated name-value pairs that are sent in plain text. For example, when you click a button to submit a form, Your browser issues an initialPOSTrequest, gets a response with aLocationheader, then issues another request without any action from you, then displays the response from that second request.
What is a response status code?
Thestatus codeis a three-digit number that the server sends back after receiving a request signifying the status of the request.
What is response code 302?
this happens when the resource has been moved
What is response code 404
resource not found
What is response code 500?
Internal server error