Sending PUT requests

Report a typo

You have the following object in your project:

Java
public class Car {

    private Long id;
    private String model;
    private int price;

    // constructors, getters, and setters
}
Kotlin
data class Car(
    private val id: Long,
    private val model: String,
    private val price: Int
)

The controller has the correctly implemented method for the PUT request handling for the /cars/{id} URI. First, you send a PUT request to the /cars/3 URI with the following body:

{
    "id": 3,
    "model": "Volkswagen",
    "price": 100000
}

Then you send another PUT request to the same URI:

{
    "id": 3,
    "model": "Tesla",
    "price": 200000
}

What will happen?

Select one option from the list
___

Create a free account to access the full topic