Chris Battey wrote:
Is there anything in the NRE reference implementation (or anywhere else) with an
example of using the put() method on a Resource? Using a Finder to find a
Resource and call handleGet() on it was pretty straightforward, but the put()
case seems more complex, and I couldn't find anywhere that the NRE uses that
method.
Thanks,
Chris
Hi Chris,
For a Resource I would use the following if you can as it is cleaner and
keeps the handleGet code to sort some stuff out for you
@Override
public Representation getRepresentation(Variant variant) { }
Anyway, for put:
@Override
public boolean allowPut() {
return true;
}
@Override
public void put(Representation entity) { }
Jonathan Hall