Exercise: Build a Dynamic Web Server
Apply knowledge of HTTP servers, routing, content types, and parameters to create dynamic routes.
We'll cover the following...
We'll cover the following...
Let’s practice what we’ve learned by creating a GET route and a POST route.
Instructions
Add a GET route
/greet
that accepts two query parameters:name
: The name of the person.language
: The language in which to greet (e.g.,en
for English,es
for Spanish).If both parameters are provided, respond with a greeting in the specified language. Example:
For ...