Hi Dave! (Shout out from fop-dev back in the day)
If you are using the Accept: header in your client ... and using the Restlet
Resource model on the server ... just write your responding code in your
override of represent(Variant variant).
if(variant.getMediaType().equals([the MediaType you speak])){
// do stuff;
} else {
// return the error status;
}
I just spotted this example blog that does pretty much what you want:
http://www.2048bits.com/2008/06/creating-simple-web-service-with.html
On Fri, Feb 6, 2009 at 6:42 AM, Dave Pawson <[email protected]> wrote:
> I want to do a GET, specifying that I can accept application/xml+atom
> as a mime type.
>
> At the server end; Unless this is specified (in the header I think -
> my knowledge of http isn't very strong)
> I want the server to reject the GET (error code 406 seems right). Even
> if no mime type is specified,
> I will still refuse the GET.
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1114729