Member-only story
This article is Part 13 of a longer course on Server Side Dart as a backend for Flutter apps. You can find the full playlist on YouTube here.
You often see URLs in your browser, but in this article you’ll learn the names and meanings the parts. This will be helpful as you are developing your server to handle URLs from an HTTP request.
Given a URL like the following:
https://www.google.com/search?q=server&num=2
These are the meanings of the elements:
https://
This is the protocol. A protocol is an agreed upon method of communication. It sets the rules for how both sides will pass information back and forth.
Other protocols include:
- HTTP
- FTP
- SMTP
www.google.com
This is the host. It is the name of the server that handles the web requests for the google.com domain. If you are creating a REST API server you might call the host something like api.example.com
.
/search
This is the path. The host server will generally handle different requests. You can use the path to tell the server the category of information you are looking for or action that you are performing.