Internet URLs and HTTP Verbs
In my previous article, we looked at HTTP basics. Now, let’s a little dive deeper into Internet Urls and HTTP Verbs.
Internet | URLs
The request message is at the center of web communications. These messages are sent via uniform resource locators and URLs. You are probably familiar with URLs but let’s talk a bit about their structure.
Protocol
The protocol is a standard that specifies how data are transmitted between computers. As you see it on your screen the first part tells what the protocol is this can either be HTTP or HTTPS. HTTPS is HTTP with encryption and verification. The only difference between the two protocols is that HTTPS uses TLS (SSL) to encrypt normal HTTP requests and responses and to digitally sign those requests and responses.
Host
The second part is the host’s address. It allows you to bring your website online by providing storage space for an internet-connected website.
Port
The following is the port number. For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol. You’d not see it often. If you don’t see it it means it’s on the default port which is port 80.
Resource Path and Query
Resource Path, an HTML file path is used to locate a file in a website folder. File paths are like file addresses for a web browser. Images, files, CSS files, JS files, videos, etc. to add to our HTML file. We can create and we can mount it with the help of these file paths.
You can have the resource path and your query variables or request data after a question mark. Other types exist that aren’t links i.e. URI. Url’s are like the hosts’ identity and actions are determined and performed via HTTP verb.
Let’s look at what HTTP verbs are and what they do.
Internet | HTTP Verbs
There are several actions that a client can perform in a host. HTTP has formalized a few that capture the essentials for all kinds of applications that are universally acceptable. These are the 4 verbs that you see on your screen. These verbs are also called CRUD operations which stand for create, retrieve, update and delete operations. These are all different functions. This is why HTTP methods are used to perform verbs. Let’s look at what HTTP methods do.
- The verb Get retrieves an existing resource using necessary information contained in the URL.
- The verb Post creates a new resource.
- The verb Put updates an existing resource.
- And the verb Delete. Well deletes an existing resource.
These 4 verbs are the most popular. Most tools and frameworks explicitly expose these request verbs. HTTP supports more verbs that are lesser used that you’d hardly ever need to use let’s see those too!
Maybe the most important part of the HTTP and even internet section from the software developer perspective at least.
- The verb Head is similar to get but without the message body
- The verb Trace is used to retrieve the jumps 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.
- The verb Options is 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
This will be it for URLs and HTTP verbs. See you guys in the next article!