users@jsr311.java.net

programmatic access to the HTTP request method

From: Bertold Kolics <Bertold.Kolics_at_Sun.COM>
Date: Mon, 02 Jun 2008 10:44:08 -0500

The API allows programmatic access to almost anything in the request
except the HTTP method. It is possible to annotate methods with
HttpMethod or any of the pre-defined method designators, but I don't see
how the HTTP method name can be obtained via the API.

I would like to put some authorization call inside resource methods in
some generic way. Instead of hard-wiring the name or doing my own
mapping (e.g. POST - create, GET - read, etc.), it'd be nice if the
method name were also available.

 From reading 3.1, it is entirely possible to have a resource class with
a single resource method that has only a path designator. Is it implied
by the specification that - in practice - there will be no resource
method implementation without a method designator?

Thanks for the clarification.

Bertold