Week 9 — Learn About Requests, Response, HTTP, and HTTPS
What is HTTP and HTTPS?
The difference between the two protocols is that HTTPS uses TLS also known as a SSL Certificate to encrypt normal HTTP requests and responses. URL stands for Uniform Resource Locator. This URL contains multiple parts such as the domain name, along with other detailed information to create a complete address to direct the browser to a specific page online.
What is a URL and URI?
URL are used to describe the identity of an item. URI provides a technique to define the identity of an item. URI is used to distinguish one resource from others regarding of the method used.
What is a Request and a Response?
When we type in a specific URL path, we are sending out a request to the web servers for a specific page. A good analogy for this is a baker sending someone to buy products for the cake. The baker gives a list, a request, to retrieve all the ingredients that are needed. Once the baker sends that request, either the employee will bring back the product, or if the ingredient was spelled wrong, and the employee can’t find the ingredient, then he would not bring anything and tell the baker that the ingredient was not in the store. This would be known as the response. When we send this request for a specific page or API, we will receive a response if the page that we are trying to access, is either successful, pending, or unsuccessful. The lead cause to retrieve a unsuccessful 404 error, would most likely be that you have inputted or misspelled the wrong path, such as the baker misspelled the ingredient.
Resources
Learn how to retrieve data from an API using Fetch from Javascript
Learn more about HTTP and the Web