...
You may wonder why the show()
method returns a HttpHeades
HttpHeaders
object and the update()
method returns the expected result code String. Well, the Rest Plugin adds in support for action methods that return RestInfo
objects as a way for the action to have more control over the response. In this example, we wanted to ensure the response included the ETag header and a last modified date so that the information will be cached properly by the client. The RestInfo
object is a convenient way to control the response in a type-safe way.
...