I\'m trying to move a resource from /buckets/1
to /buckets/2
such that:
GET /buckets/1
DELETE /buckets/1
PUT /buckets/2 {data returned by #1}
That doesn't make the server 301
, though. The alternative would be to use the WebDAV MOVE method, i.e. by creating your own @MOVE
annotation using the @HttpMethod
annotation:
import ...;
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@HttpMethod("MOVE")
public @interface MOVE {}
but doing so breaks REST's architectural principle of using HTTP as a uniform interface (RESTful Java).