Complete single JSON request

Report a typo

Here is the request:

POST http://localhost:8080/flights
Content-Type: application/json

{
    "id" : "1234",
    "destination" : "YYZ",
    "source": "MCO"
}

with a single JSON object, representing a Flight object and the handler:

Java
{1}(value = "/flights")
String addFlight(@RequestBody {2} flightToAdd)
Kotlin
{1}(value = ["/flights"])
fun addFlight(@RequestBody flightToAdd: {2}): String

Complete the handler to make it available to handle the given request.

Select one option from the list
___

Create a free account to access the full topic