a. Update the route /get/message
to a dynamic URL which takes customer id
as a parameter.
b. Update the 'Hello World' variant to
- return the following file with auto file location calculation.
json { "message" : "Hello World" }
- Set the following header params in response
{ fname: John lname: Doe }
Hello Universe
variant
{
"message" : "Hello Universe"
}
{
customerId: 123456
}
Hello - fname lname
POST
route /set/customerId
and in default handler read the payload value and log it on console.{
"customerid": 123456
}
/get/message
with customer id greater than 5 characters and check the response is Invalid Id
/get/message
with customer id equal to 5 characters and check the response to be Hello undefined undefined
http://localhost:8000/get/message/12345?fname=John&lname=Doe
and check the response to be Hello John Doe
Hello World
variant and check the response is "message" : "Hello World"
and use dev tools on Chrome browser to verify that the header params are set (fname: John and lname: Doe)Hello Universe
variant and check the response is "message" : "Hello Universe"
and use dev tools on Chrome browser to verify that the cookie is set (customerId: 123456
)http://localhost:8000/set/customerId
using Postman (or any other HTTP client) with the following data and verify that 12345
is logged on the console{
"customerId" : 12345
}