In this recipe, we explained how we can do routing. A URL (for example, http://example.com:8080/some/path?param) has these two main parts:
- The first part locates the server and service, and is composed of a scheme (such as HTTP/HTTPS), a host name (example.com), and a port.
- The second part is composed of a path or routes, and query parameters. (/some/path?param).
The generic schema is explained at https://en.wikipedia.org/wiki/URL.
In a web application, we are interested in the HTTP/HTTPS schema and path. Each path can be connected by a remote user through a verb such as GET, POST, PUT, or DELETE. Combined with HTTP verbs and paths, the web application delivers web content.
In this recipe, we worked with GET requests ...