Using Jersey, what is the RESTish way to this, Should I create a method starting with “update” like this, or I should create a subresource (or whatever Jax-Rs thing) under accountseetings path? Or should I simply use the same method name with different verbs?
@GET
@Path("/accountsettings")
public Settings accountSettings() {
}
@PUT
@Path("/updateaccountsettings")
public void updateAccountSettings() {
}
In REST verbs define what you are doing and URLs define what you are doing it to.
So here a PUT to
/accountsettingswould seem to be the normal way to do it.Calling the method
updateAccountSettings()seems to make sense.