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}): StringComplete the handler to make it available to handle the given request.