private JerseyRequest<ClientResource> prepareCopyOrMoveRequest(String fromUri) { JerseyRequest<ClientResource> request = buildRequest( sessionStorage, ClientResource.class, new String[] {"/resources", resourceUri}, new DefaultErrorHandler()); request.addParams(params); request.addHeader("Content-Location", fromUri); return request; }
private <ResourceType extends ClientResource> JerseyRequest<ResourceType> preparePatchResourceRequest( Class<ResourceType> resourceTypeClass) { JerseyRequest<ResourceType> request = buildRequest(sessionStorage, resourceTypeClass, new String[] {"/resources", resourceUri}); request.setAccept( MimeTypeUtil.toCorrectContentMime( sessionStorage.getConfiguration(), ResourcesTypeResolverUtil.getMimeType(resourceTypeClass))); request.addHeader("X-HTTP-Method-Override", "PATCH"); return request; }