Getting POST parameters

Report a typo

A POST request is sent to localhost:8080/page containing the name parameter with the value "Sam".
Imagine that you want to get the form parameters twice.

post("/page") {
     val formParameters = call.receiveParameters()
     val formParameters2 = call.receiveParameters()
     println(formParameters["name"])
     println(formParameters2["name"])
}

What do you see in the console?

Try running this code in the IDE and look at the console output.

Select one option from the list
___

Create a free account to access the full topic